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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
Anonymous
Not applicable

Conditional Measure Based on Available Field Values

Hi, Simplistic version; I have 3+ facilities. 2 Of the facilities (FacA & FacB) do not report the data I want to show so I have to show a different measure when they are selected.

Facilities are stored in Table Facilities. Named as FacilitiesName

Measure A if any of the 2 facilities are filtered. 

 

Measure B if neither of the 2 are selected.

 

And to note the 2 facilities could be filtered through RLS not by slicer. So whena user logs on they may just have those 2 facilities available or a user could use slicer to filter to those 2 fields.

3 REPLIES 3
Anonymous
Not applicable

Thank you. but its not giving me the second measure 

Follow Up Switch = if(isfiltered(Facility[Facility_Name]) && countx(filter(Facility,Facility[Facility_Name] in {"FACA" ,"FACB"}),Facility[Facility_Name])+0>1, [Date Since Worked],[Compliance %])

Hi @Anonymous , can you show your expected result with some dummy data? It seems [Date Since Worked] should return date data type and [Compliance %] should return decimal number data type. This may cause a problem because you can set only a format for the conditional measure.

amitchandak
Super User
Super User

@Anonymous , Try a new measure like

 

if(isfiltered(Facilities[FacilitiesName]) && countx(filter(Facilities,Facilities[FacilitiesName] in {"FacA" ,"FacB"}),Facilities[FacilitiesName])+0>1, [Measure A],[Measure B])

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

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

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.