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

View all the Fabric Data Days sessions on demand. View schedule

Reply
danextian
Super User
Super User

Measure to show current selection

I've been trying to do this but just can't get it right so I'm here again asking for your help. Thanks in advance.

 

how do i do this?

none or all selected = all categories are selected

two or more selected = multiple categories

one selected = category name

 

I can't the "multiple" selection part right. The card always  shows "all categories are selected". I wrote something like

measure = if(not(hasonevalue(column_name)),"all",values(column_name))





Dane Belarmino | Microsoft MVP | Proud to be a Super User!

Did I answer your question? Mark my post as a solution!


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.
1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @danextian,


>>I can't the "multiple" selection part right.

Measure not support show multiple values, if your select multiple values, you should merge them to one:

 

SelectItem = 
IF(COUNTROWS(ALL(User))=COUNTROWS(ALLSELECTED(User)),
	"All or None",//check all or none
	if(HASONEVALUE(User[First Name]),
		VALUES(User[First Name]),//single
		CONCATENATEX(VALUES(User[First Name]),[First Name],","))//mutiple
		)

 

Capture.PNG

 

Regards,

Xiaoxin Sheng

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Hi @danextian,


>>I can't the "multiple" selection part right.

Measure not support show multiple values, if your select multiple values, you should merge them to one:

 

SelectItem = 
IF(COUNTROWS(ALL(User))=COUNTROWS(ALLSELECTED(User)),
	"All or None",//check all or none
	if(HASONEVALUE(User[First Name]),
		VALUES(User[First Name]),//single
		CONCATENATEX(VALUES(User[First Name]),[First Name],","))//mutiple
		)

 

Capture.PNG

 

Regards,

Xiaoxin Sheng

Hi @Anonymous

 

Thanks for your help. I was able to show "multiple". I used countrows(Tabe[User]) since I crossfilter using visuals and not through a User slicer. 





Dane Belarmino | Microsoft MVP | Proud to be a Super User!

Did I answer your question? Mark my post as a solution!


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors