Forum Discussion
Conditional formatting levels in a matrix visual based on filters
I have a data set that includes up to 4 levels of parent/child relationships. I've used the information at https://www.daxpatterns.com/hierarchies/ to set up the relationships. Each row also has a boolean field called Important. This can be set at any level in the hierarchy.
I have a matrix visual that displays the data in a hierarchy. I have set up a slicer for the Important field. The matrix visual displays parent rows that that are not flagged as important if it has a child row that is flagged as important. This is the behaviour I want.
Now I'd like to apply conditional formatting to highlight rows that are tagged as important, to distinguish them from rows that aren't tagged as important but have an important child row.
| ID | Parent Id | Type | Name | Important |
| 1 | Initiative | Sell house | 1 | |
| 2 | Initiative | Buy house | ||
| 3 | 1 | Epic | Paint house | |
| 4 | 1 | Epic | Fix windows | 1 |
| 5 | 1 | Epic | Landscape garden | |
| 6 | 2 | Epic | Find new house | |
| 7 | 2 | Epic | Get mortgage | |
| 8 | 3 | Task | Prepare walls | |
| 9 | 3 | Task | Buy paint | |
| 10 | 4 | Task | Replace broken windows | |
| 11 | 4 | Task | Fix window locks | |
| 12 | 5 | Task | Cut lawn | 1 |
| 13 | 5 | Task | Plant flowers | |
| 14 | 6 | Task | Shortlist properties | 1 |
| 15 | 6 | Task | Get property inspection | |
| 16 | 6 | Task | Attend auction | |
| 17 | 7 | Task | Update finance information | |
| 18 | 7 | Task | Save money | |
| 19 | 7 | Task | Visit bank |
The bullet points below show's the hieararchy filtered to just the important items (including parents). I assume I need to create a measure that will identify if the row is set to important or not.
- Sell House
- Fix windows
- Landscape Garden
- Cut lawn
- Buy house
- Find new house
- Shortlist properties
- Find new house
Is this possible?
Hi ivan_wilson
If I understood you correctly you need to apply conditional formatting to row heathers thanUnfortunately, we don't have a conditional formatting functionality on matrix rows.
There is an idea about this issue please vote for it here:
https://ideas.fabric.microsoft.com/ideas/idea/?ideaid=b02bce75-4528-ec11-b76a-281878e62223This option is available at inforiver visuals, but for pay:
https://community.inforiver.com/tips-tricks/post/conditional-formatting-of-whole-table-rows-using-in...https://www.youtube.com/watch?v=WF7fCAmjjZc
But you can apply it to the values.
You can create a flag measure with dax :
flag = if max('your table'[important] = 1 , 1,0)
and use this measure for the rule on conditional formattingIf this post helps, then please consider Accepting it as the solution to help the other members find it more quickly
1 Reply
- Ritaf1983Super User
Hi ivan_wilson
If I understood you correctly you need to apply conditional formatting to row heathers thanUnfortunately, we don't have a conditional formatting functionality on matrix rows.
There is an idea about this issue please vote for it here:
https://ideas.fabric.microsoft.com/ideas/idea/?ideaid=b02bce75-4528-ec11-b76a-281878e62223This option is available at inforiver visuals, but for pay:
https://community.inforiver.com/tips-tricks/post/conditional-formatting-of-whole-table-rows-using-in...https://www.youtube.com/watch?v=WF7fCAmjjZc
But you can apply it to the values.
You can create a flag measure with dax :
flag = if max('your table'[important] = 1 , 1,0)
and use this measure for the rule on conditional formattingIf this post helps, then please consider Accepting it as the solution to help the other members find it more quickly