Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Thulasiram
Helper II
Helper II

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:
 
Screenshot 2023-07-25 055429.png
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 2
amitchandak
Super User
Super User

@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

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

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?

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.