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

Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!

Reply
Yonko
Helper I
Helper I

Using Format function with Calculated Groups to convert numbers to millions doesn't work properly

Hello. I have some data with big numbers and what i want is to create a slicer so a user can choose what format he want to see: usual (like 1 234 567) or in millions (1.2 M). To make this i created a calculation group with two values - first one is nothing but a SELECTEDMEASURE() and the second one is FORMAT function (you can see it on screen).
The problem that when i activate Mln option on slicer it works only with card or table visual but don't work with line or bar chart. I guess the problem may be because it convers it to text format and it can't calculate it properly or something else. Anyway, any suggestions to force it work on every visual?

Without applying format:

Yonko_0-1666866246901.png

With format:

Yonko_1-1666866272777.png

 

1 ACCEPTED SOLUTION
johnt75
Super User
Super User

Change the calculation item for the millions. Change the expression to just return SELECTEDMEASURE(), as the other one does, and instead edit the format string expression for the millions.

View solution in original post

2 REPLIES 2
johnt75
Super User
Super User

Change the calculation item for the millions. Change the expression to just return SELECTEDMEASURE(), as the other one does, and instead edit the format string expression for the millions.

Thanks, it worked.

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

Vote for your favorite vizzies from the Power BI World Championship submissions!

Sticker Challenge 2026 Carousel

Join our Community Sticker Challenge 2026

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

January Power BI Update Carousel

Power BI Monthly Update - January 2026

Check out the January 2026 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.