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

Reply
mabCOLONEL
Frequent Visitor

Conditional Formatting MAtrix based on 2 unrelated measures

I have a matrix that shows metrics per employee.  I use a location dimension in a slicer to allow drilling into a specific division.  

 

I have 3 divisions for thousands of employees.  

 

I want to apply conditional formatting to a column based on the results of [RankOverall] measure.  But I only want to apply that conditional formatting if the user has selected less than 3 (all) divisions.  

 

I tried doing a distinct count of allselected('Location'[division]) as a variable, and returning the [RankOverall] only if the count is <3.  But that returns a count of 1 division per row.  Which is technically correct, but I want a distinct count of selected division regardless of the employee row.  

how can i write a measure to show distinct count of 'Location'[Division] that is not effected by the employee relationship to division?

Example, 

Division Slicer

3 divisions sleceted

North
East

West

EmployeeDivisionSelected DivisionsMetrcs
John DoeEast3123456
Jane DoeWest3456789
3 REPLIES 3
_AAndrade
Super User
Super User

If you can share a pbix file with a sample data I can try to help you.





Did I answer your question? Mark my post as a solution! Kudos are welcome.

Proud to be a Super User!




_AAndrade
Super User
Super User

Hi,

Did you try to change Allselected to All?





Did I answer your question? Mark my post as a solution! Kudos are welcome.

Proud to be a Super User!




Yes, that still returns a distinct division count of 1 per each row.  Im struggling to get a value regardless of row header/matrix context. 

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.

Top Solution Authors