Forum Discussion
Edit Table with Calculation Items
- Anonymous9 months ago
Hi AlissaStuart ,
Thank you for reaching out to Microsoft fabric community forum.
Since your rows are generated from a calculation group, the Matrix can't directly apply color to the row headers. However, you can still achieve clear row banding by coloring the values according to the calculation item in each row. To do this, create a simple color measure that checks the selected calc item (using SELECTEDVALUE('Calc Group'[Name])) and returns a hex color with a SWITCH statement, assigning each item or subgroup a specific color. To handle totals, use IF(NOT ISINSCOPE('Calc Group'[Name]), BLANK(), <color>). Then, in the Matrix, use Conditional formatting - Background color - Field value and select this color measure for the Values/Totals. This will shade each data row by calc item, giving you the subgroup highlights you want without changing your calc group setup. If you have many items, consider adding a [Subgroup] column to the calc group table and use it in your SWITCH to keep color assignments organized.
Create calculation groups in Power BI - Power BI | Microsoft Learn
Hope this helps. Please reach out for further assistance.
Thank you.
Hi AlissaStuart ,
Thank you for reaching out to Microsoft fabric community forum.
Since your rows are generated from a calculation group, the Matrix can't directly apply color to the row headers. However, you can still achieve clear row banding by coloring the values according to the calculation item in each row. To do this, create a simple color measure that checks the selected calc item (using SELECTEDVALUE('Calc Group'[Name])) and returns a hex color with a SWITCH statement, assigning each item or subgroup a specific color. To handle totals, use IF(NOT ISINSCOPE('Calc Group'[Name]), BLANK(), <color>). Then, in the Matrix, use Conditional formatting - Background color - Field value and select this color measure for the Values/Totals. This will shade each data row by calc item, giving you the subgroup highlights you want without changing your calc group setup. If you have many items, consider adding a [Subgroup] column to the calc group table and use it in your SWITCH to keep color assignments organized.
Create calculation groups in Power BI - Power BI | Microsoft Learn
Hope this helps. Please reach out for further assistance.
Thank you.
- legenda6899 months agoRegular Visitor
Thatnk you for your answer, but I'm still a bit confused about the script.
First, here is what my Calculation Group looks like.
so if I understood correctly my script will begin with something like this (I wrote it only for one vale so far)?Conditional Format =SWITCH(SELECTEDVALUE('Calculation group'[Calculation group column]),[Job Starts],"#72c197","#72c177")
But when I apply to the table via following method nothing happens to the table.I think my mistake is using [ ] to select job start.
Can you please help again?
Thank you,
Alissa - Anonymous9 months agoNot applicable
Hi AlissaStuart ,
I wanted to check if you had the opportunity to review the information provided. If you still require support, please let us know, we are happy to assist you.
Thank you.