Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago
Solved

How to make a card return predetermined text when no/multiple items in a category selected (example)

https://www.timesunion.com/local/article/More-Capital-Region-students-are-qualifying-for-12497790.php   You can see the example a bit down the page under "Free Lunches..."   When no counties are ...
  • dedelman_clng's avatar
    dedelman_clng
    7 years ago

    Try this code:

     

    Income Show Text =
    IF (
        NOT ( ISFILTERED ( MedianHouseIncome[Geography] ) ),  //No filters
        "Select County",
        IF (
            COUNTROWS ( FILTERS ( MedianHouseIncome[Geography] ) ) > 1, //More than one value
            "Multiple Counties",
            SELECTEDVALUE ( MedianHouseIncome[Geography] ) //else condition, implies 1
        )
    )

     

    Hope this helps

    David