Forum Discussion

mabCOLONEL's avatar
mabCOLONEL
Frequent Visitor
2 years ago

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

    • AndrewPe's avatar
      AndrewPe
      New Member

      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. 

  • _AAndrade's avatar
    _AAndrade
    Resident Rockstar

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