Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
AnandNamburi
Helper III
Helper III

How to display "All" instead of Blank value in a card

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

 

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@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")

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

2 REPLIES 2
freginier
Super User
Super User

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
		)
	)

 

amitchandak
Super User
Super User

@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")

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors