Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
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
Check out the July 2025 Power BI update to learn about new features.
User | Count |
---|---|
25 | |
10 | |
7 | |
6 | |
6 |
User | Count |
---|---|
30 | |
11 | |
11 | |
10 | |
6 |