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.
Hello,
A slight modification is required to the below DAX measure. It is working fine but I need to include a default message when all the packages (category) are selected. I tried but its not working at all.
On default all categories are selected in a slicer at that time its so messy as showing all values. I need to show a message " All values selected" to the below DAX
@Anonymous You can download the PBIX from the solution at the bottom of the Quick Measure Gallery entry. Has all the formulas, etc. If you scroll down the entire formula is listed, here is the relevant snippet (below). And yes on the Card visual.
VAR __TOTAL_ROWS = COUNTROWS(DISTINCT(ALL('Table'[Brand])))
VAR __CURRENT_ROWS = COUNTROWS(DISTINCT('Table'[Brand]))
VAR __MAINTEXT =
IF(
__USEPERCENT,
VAR __PERCENT = DIVIDE(__CURRENT_ROWS,__TOTAL_ROWS,0)
RETURN IF(ISBLANK(__PERCENT),__PERCENTZEROTEXT & __PERCENTTEXT,FORMAT(__PERCENT,"Percent") & __PERCENTTEXT),
SWITCH(
TRUE(),
__CURRENT_ROWS = __TOTAL_ROWS,__ALLTEXT,
__CURRENT_ROWS = 0,__NONETEXT,
Thanks Greg. I will make changes and update here 🙂
@Anonymous If I remember correctly from https://community.powerbi.com/t5/Quick-Measures-Gallery/The-Most-Amazing-Mind-Blowing-Dynamic-Slicer-Title-Measure-Ever/td-p/429587. What I did was do a COUNTROWS('Table') and compare it with a COUNTROWS(ALL('Table')). If the 2 values are equal, then everything is selected. Might also be able to do a IF(NOT(ISFILTERED())...)
Wow @Greg_Deckler .
This is what I was actually looking for. Is it possible for you to share the formula you used over here.
I like the way how you are saying " You have filtered over B1, B2, B3 and 4 more brands". I will also add a similar style in mine. Have you displayed that via card visual?
Thanks,
Karthik
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 |
---|---|
47 | |
24 | |
20 | |
15 | |
12 |
User | Count |
---|---|
55 | |
48 | |
43 | |
19 | |
19 |