Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
You can see the example a bit down the page under "Free Lunches..."
When no counties are selected or more than one, the card at the top returns "Multiple Counties". How is this being accomplished? I've seen asked and answered examples of returning blanks, but not returning text such as this.
Based on this discussion (https://community.powerbi.com/t5/Desktop/Make-visual-blank-display-instructions-until-other-visual/t...) talking about another aspect of the same report, I was able to add this measure.
Solved! Go to Solution.
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
Try HASONEVALUE
IF ( HASONEVALUE ([County]), [County], "Multiple Counties" )
Hope this helps
David
Thanks a lot, really helped out! I've almost got it, here's the full code I have right now.
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
That worked! David, you are a rock star!
One further thing to realize is that if there is any other filter anywhere in the report or page (not just on the visual or on a specific slicer) then ISFILTERED is going to return TRUE
Okay so after thinking about it more, I see what's happening. The & is a concatenation, so it's putting the Select County and Multiple Counties together because they're both false. When multiple counties are selected it shows up correctly because only one is false.
As a work around I could separate them out into two measures and overlay the cards, but I would really like to avoid that if possible and keep it in one measure.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
97 | |
96 | |
81 | |
74 | |
66 |
User | Count |
---|---|
126 | |
106 | |
105 | |
86 | |
72 |