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

The ultimate Microsoft Fabric, Power BI, Azure AI & SQL learning event! Join us in Las Vegas from March 26-28, 2024. Use code MSCUST for a $100 discount. Register Now

Not applicable

Dynamic Formatting for Thousands & Millions

Hi all,


I wonder if anyone can suggest a means of using the custom format capabilities of PowerBI to replicate what in Excel would look like this:


[>=1000000] #,##0.00,,"m";[<1000000] #,##0.0,"k";General


Essentially what I'm after is for when the number is in the millions for it to be formatted with two decimal places and have an 'm' appended to the number, when it's in the thousands, a single decimal place and a 'k' appended. I'm aware that I could create a measure using the SWITCH function to do this, but wonder if anyone has come up with a custom format that does the same thing?


Thanks in advance,



Advocate I
Advocate I

Power BI can now do this. It is called dynamic format strings

Create dynamic format strings for measures in Power BI Desktop - Power BI | Microsoft Learn

Regular Visitor

Screenshot 2023-08-11 182835.png

hi i am wondering if someone could helpme. i tried to change the format to currency and seted up with two decimal places. i got everything righ in other chart but not this multi-row card. I don't know why.


If these are measures, make sure it is set on the measure itself


I have set this and it seems to work for me



New Member


In the above screenshot, you can see I have selected the measure - "Total Revenue".

Under the format Tab, the format Is General.

---- Switch the format to Currency.

---- Also adjust the decimal points to two places.




Check the above screenshot. You can check the card which shows Monthly revenue and check the values as they add a "K" or "M" when required.



Advocate I
Advocate I

I am looking for a solution to this too if anyone knows of one?

Rather than writing it into a measure, I would like to do it using the dropdown option to select custom format like you do in Excel

Regular Visitor


I have also encountered the same issue and was wondering has anyone found a solution for this yet. Even when i set the 

[>=1000000] #,##0.00,,"m";[<1000000] #,##0.0,"k";General

in excel and import into PowerBi, it will clear this.  

Super User
Super User
Not applicable


Thanks for the reply - I think maybe you misunderstood the question slightly: I'm looking to use custom formatting in the Model view to do this rather than in a measure. The ultimate goal being that I can do a quick, non-destructive change to a number's format rather than having to go a write a measure everytime (as per the SWITCH suggestion in my original post). The RADACAD article is useful, but only really for date formats.


Custom format in Model viewCustom format in Model view





Helpful resources

Fabric Community Conference

Microsoft Fabric Community Conference

Join us at our first-ever Microsoft Fabric Community Conference, March 26-28, 2024 in Las Vegas with 100+ sessions by community experts and Microsoft engineering.

February 2024 Update Carousel

Power BI Monthly Update - February 2024

Check out the February 2024 Power BI update to learn about new features.

Fabric Career Hub

Microsoft Fabric Career Hub

Explore career paths and learn resources in Fabric.

Fabric Partner Community

Microsoft Fabric Partner Community

Engage with the Fabric engineering team, hear of product updates, business opportunities, and resources in the Fabric Partner Community.