Dynamic textbox hide unless filtered

MarkSnodgrass
MarkSnodgrass Portland, Oregon 🟤

I have created a dashboard that has a US map with about 20 single values cards and dynamic textboxes surrounding it. The value cards all show the sum total when no state is selected, which is great. However, the dynamic textbox that shows the first state in the dataset when no state has been selected on the US map, which is wrong and very misleading. Is there a way to hide the dynamic textbox card when no state has been selected, or display some different message? 

Best Answer

  • jaeW_at_Onyx
    jaeW_at_Onyx Budapest / Portland, OR 🟤
    Accepted Answer

    it would be computationally expensive, but could you wrap your metric in a CASE statement that calculates if improper filters have been applied?

     

    Example, if the metric is only correct if one state has been selected, could you do:

    CASE WHEN countDISTINCt(STATE) = 1 then ... else <metric that works across all states> end

Answers

  • MarkSnodgrass
    MarkSnodgrass Portland, Oregon 🟤

    Brilliant @jaeW_at_Onyx  ! 

    I created the following beast mode: 

    (CASE WHEN COUNT(DISTINCT `state name`) = 1 
    THEN CONCAT('Total Estimated Cost for ', `state name`)
    ELSE ''
    END)

    and dropped this beast mode into the Category field of the dynamic textbox and then just display the First Category in the General - Text properties. 

    The card is blank until I click on a state on my US map and then it shows the text I wanted. 

    Thanks!

This discussion has been closed.