Forum Discussion
Troubles coloring pivot tables
Hi there!
I have a pivot table that I try to color:
I usa a column to switch the color:
Sottotipo_FillColor = Switch(Andon[Sottotipo], "INCIDENTE", "#EA5545","NEARMISS","#EDE15B","UNSAFE ACT","#8BE04E","UNSAFE CONDITION","#5AD45A","FIRST AID","#FFA300")
but as you can see if I have no data for a month (I used a measure to put "0" if the count of the events is actually 0:
Eventi_Safety = IF(count(Andon[Created])=0,0,count(Andon[Created]))) the color is not applied.
To apply the conditional formatting I use the FillColor option in "Cell elements" menu:
  
I need to color both the RowTitle cell and the "0" elements with the same conditional formatting rules.
But seems that the f(x) button used to apply the conditional rules is not avaiable in those elements.
Some ideas?
Thanks.
14 Replies
- ray_aramburo
Super User
You can't apply conditional formatting to row headers in the standard matrix visual.
- andreazambon
Helper V
Ok, what about the empty/0 values?
- ray_aramburo
Super User
Follow mussaenda 's suggestion 🙂
- mussaenda
Community Champion
Hi andreazambon ,
You can use this
or have you tried to add
a condition on your switch like if column = value and measure = 0 then this color
- andreazambon
Helper V
2 things:
I tried your strategy with background color but I don't have a unique value for the field I base the color, but I always get a count of that value, not like your example.
In any case, I can't get how this could work: I need to color all the values of the row "INCIDENTE" by red, its not based on the value itself.
I tried with your suggestion about the condition in the formula, but it does not work: Just to try the first row, due to color ONLY the zero as example, this is the code:
Sottotipo_FillColor2 = IF(AND(Andon[Sottotipo]="INCIDENTE", count(Andon[Sottotipo])=0), "#EA5545","")- mussaenda
Community Champion