Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

Conditional Formatting Data Labels

HI All,

I have a line graph which has some values shown as data labels, i would like to conditionally format these labels. Can anyone help?

 

 

  • Hi  Anonymous ,

     

    You cannot condittional formatting data labels however you can make a work around:

     

    Create 3 measures:

    Total Values = SUM(Table[Column])
    
    Total Values Above =  IF([Total Values] < 100; BLANK(); [Total Values] )
    
    Total Values Below=  IF([Total Values] < 100; [Total Values] ;BLANK())
    ​

    Now add your measure to the line chart and make the following setup:

    Turn of the lines on the Values above and below

    Turn off data labels on the Total Values measure

    Make different formatting for labels for lines above and below

     

    Adjust the measure to what you need if you want to have additional levels you need to create additional measures.

     

    Check PBIX file attach.

3 Replies

  • Hi  Anonymous ,

     

    You cannot condittional formatting data labels however you can make a work around:

     

    Create 3 measures:

    Total Values = SUM(Table[Column])
    
    Total Values Above =  IF([Total Values] < 100; BLANK(); [Total Values] )
    
    Total Values Below=  IF([Total Values] < 100; [Total Values] ;BLANK())
    ​

    Now add your measure to the line chart and make the following setup:

    Turn of the lines on the Values above and below

    Turn off data labels on the Total Values measure

    Make different formatting for labels for lines above and below

     

    Adjust the measure to what you need if you want to have additional levels you need to create additional measures.

     

    Check PBIX file attach.

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Anonymous ,

     

    Have your problem be solved? Please consider accept the answer as a solution if it worked.

     

    Best Regards,

    Jay

    Community Support Team _ Jay Wang

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.