Forum Discussion
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 West |
| Employee | Division | Selected Divisions | Metrcs |
| John Doe | East | 3 | 123456 |
| Jane Doe | West | 3 | 456789 |
3 Replies
- _AAndradeResident Rockstar
Hi,
Did you try to change Allselected to All?- AndrewPeNew 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.
- _AAndradeResident Rockstar
If you can share a pbix file with a sample data I can try to help you.