Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hi Experts,
I have a requirement to display the selected value in a card and for that I'm using DAX function "Selectedvalue".
When ever I select something in slicer that is reflecting in my card and when I clearmy selection it is displaying Blank.
Now my requirement is to display "ALL" instead of blank when we don't select anything in slicer.
I have created a measure using formula Measure=Selectedvalue('Table Name'[Column name])
Can any one suggest me how can I acheive this.
Thanks,
Anand
Solved! Go to Solution.
@AnandNamburi , try like
if(isfiltered('Table Name'[Column name]), Selectedvalue('Table Name'[Column name]), "All")
or
if(isfiltered('Table Name'[Column name]), Selectedvalue('Table Name'[Column name]) & "" , "All")
This measure count the selected user if multiple or the user name if only one selected. You can adapt it to your case
Measure =
VAR __DISTINCT_VALUES_COUNT = DISTINCTCOUNT('Table'[user])
VAR __MAX_VALUES_TO_SHOW = 1
RETURN
IF(
__DISTINCT_VALUES_COUNT > __MAX_VALUES_TO_SHOW,
__DISTINCT_VALUES_COUNT & " selected users"
,
CONCATENATEX(
VALUES('Table'[user]),
'Table'[user],
"",
'Table'[user],
ASC
)
)
@AnandNamburi , try like
if(isfiltered('Table Name'[Column name]), Selectedvalue('Table Name'[Column name]), "All")
or
if(isfiltered('Table Name'[Column name]), Selectedvalue('Table Name'[Column name]) & "" , "All")
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
Check out the November 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 59 | |
| 43 | |
| 42 | |
| 23 | |
| 17 |
| User | Count |
|---|---|
| 190 | |
| 122 | |
| 96 | |
| 66 | |
| 47 |