Forum Discussion

iuli's avatar
iuli
Regular Visitor
4 years ago

Conditional formatting for Total Label on stacked column chart

Hello, 

 

I used a measure to color the total label in red / green. For a matrix works ok, but not for total label. 

5 Replies

  • iuli's avatar
    iuli
    Regular Visitor

    Hi,

     

    the measure is : 

    color = SWITCH(TRUE(), SUM('Table'[Products_CY]) > SUM('Table'[Products_PY]), 1 , 0 ) // 1=red, 0=green
  • iuli's avatar
    iuli
    Regular Visitor

    the attached picture shows how the conditional rule is appyed using the above color measure

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hi iuli ,

      Can I know that are the field Products_CY and Products_PY fact fields of the table or measures? If they are measures, could you please provide their formula? By the way, all of fields which apply on the stacked column chart visual are all from the same table? It is better if you can provide a simplified pbix file. Thank you.

      Best Regards