Forum Discussion

Thulasiram's avatar
Thulasiram
Helper II
3 years ago

Formatting custom data lable through dax

Hi all

I have created a bar chart and applied custom label through measure described below:

FORMAT([Erp Invoice]/100000, "0" & " L" & " | ") & FORMAT([ERP Inv%], "0.0%" & " | ") & "(" & FORMAT([Avg Inv Rate],"0")&")"
It consists three parts as below:
 
I would like the apply different colors to the above three categories of labels thro conditional formatting.
Can it be achieved by creating DAX and applying in conditional formatting?  If so, can anybody help me in giving that Dax?
Help is much appreciated.
 
Thulasiraman
 
 

2 Replies

  • Thulasiram , The label can conditional formatting for each row of data not the partial one.

     

    You can create a measure like

    if([Avg Inv Rate]<.05, "red", "green")

     

    and use that in conditional formatting (Fx on color) using field value option

    • Thulasiram's avatar
      Thulasiram
      Helper II

      Thank you amitchandak for your reply and suggestion.

      I tried that if formula as suggested by you, but it is not working.

      Is it due to the reason that the custom label contain 3 parts of data but the if formula contains only 1 part of the custom label?