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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
Anonymous
Not applicable

Formatting numbers to B, M, K dynamically based on values in bar chart

Hello All,

I am trying to get value lables in below picture in power BI bar chart, my Y-AXIS measure is EntryCount=Count(Table[EntryNumber]).
If my number value is in millions show it in millions , if like 0.4M show it as 400k like this 

Bharathi_99_0-1729584296763.png


Please help,
Thanks




1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Anonymous ,
Thanks for his reply. His measure is available, but one thing I need to correct is that in this case, the y-axis accepts a numeric type and the format casts it to a text type, which is why the outright substitution is unsuccessful. The correct application is visualizations -> Format your visual ->Data lablesv -> Value, apply this measure to the filed box

vheqmsft_0-1729652734275.png

Final output

vheqmsft_1-1729652752332.png

 

Best regards,
Albert He


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

 

 

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

Hi @Anonymous ,
Thanks for his reply. His measure is available, but one thing I need to correct is that in this case, the y-axis accepts a numeric type and the format casts it to a text type, which is why the outright substitution is unsuccessful. The correct application is visualizations -> Format your visual ->Data lablesv -> Value, apply this measure to the filed box

vheqmsft_0-1729652734275.png

Final output

vheqmsft_1-1729652752332.png

 

Best regards,
Albert He


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

 

 

bhanu_gautam
Super User
Super User

@Anonymous , You can create a measure 

 

If you want to customize the display units further, you can use a DAX measure to format the values. 
FormattedEntryCount =
VAR EntryCountValue = [EntryCount]
RETURN
SWITCH(
TRUE(),
EntryCountValue >= 1000000, FORMAT(EntryCountValue / 1000000, "0.0M"),
EntryCountValue >= 1000, FORMAT(EntryCountValue / 1000, "0K"),
FORMAT(EntryCountValue, "0")
)


Use the Custom Measure:
Replace your Y-axis measure with the new FormattedEntryCount measure.




Did I answer your question? Mark my post as a solution! And Kudos are appreciated

Proud to be a Super User!




LinkedIn






Anonymous
Not applicable

I cannot able to add above measure in Y-AXIS, when i am dragging it directly going and placing in Tooltips, 
why it's happening like this any idea?

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.

Top Solution Authors