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

We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now

Reply
aTChris
Resolver I
Resolver I

Conditional Rounding

Hi everyone

 

Can anyone think of a way that I can apply conditional rounding to a card?

I have a report showing revenue, profit, targets etc for different business units within a group. Some units are smaller than others, therefore, they report in hundreds of thousands some over a million. I want to be able to show one decimal place if millions but zero decimal places if thousands.

 

e.g. £562K & £1.3M

 

I use a measure to calculate the values which are then filtered by business unit thus applying the decimal place in modeling impacts all business units.

 

Hope someone can help.

 

Thanks

 

Chris

1 ACCEPTED SOLUTION

Use round to in formula and check

Measure = IF([Measure]>1000000,FORMAT(round([Measure]/1000000,0),"£#.#M"),FORMAT(round([Measure]/1000,0),"£#K"))
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

View solution in original post

4 REPLIES 4
amitchandak
Super User
Super User

You can check the number use if or Switch and format to give a formatted number. But the output will become text

https://docs.microsoft.com/en-us/power-bi/desktop-custom-format-strings

 

if([Measure]>1000 && [measure]<=1000000,format([measure]/1000,"#,#")

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

@amitchandak 

Thanks I will give that a go

@amitchandak 

 

That is really useful, the only concern I have is the rounding. Using your suggestion I've got it displaying correctly.

Measure = IF([Measure]>1000000,FORMAT([Measure]/1000000,"£#.#M"),FORMAT([Measure]/1000,"£#K"))

However if the value is £309.5K it only shows £309, where I should display £310K

Do you have any suggestions for rounding before I convert to text?

 

Thanks

 

Chris

Use round to in formula and check

Measure = IF([Measure]>1000000,FORMAT(round([Measure]/1000000,0),"£#.#M"),FORMAT(round([Measure]/1000,0),"£#K"))
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

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.