Curbal has its own social media server on Mastodon. Check it out here!
Welcome to our Knowledge Base

Tip: Start typing in the input box for immediate search results.


Show data labels in k or M in the same column | Dynamic formatting in Power BI

If you want to be able to conditional format a number in Power BI as k for thousands and M for millions in the same column, the new Dynamic Formatting can do that for you.

Watch the tutorial on YouTube

Show numbers in Thousands or Millions in same column with the new Dynamic formatting in Power BI

The code

And here is the code for the formatting:

VAR salesMeasure = [Total Sales] 
salesMeasure<1000000, "#,.0K", 
salesMeasure<1000000000, .0M", 
salesMeasure>=1000000000, "#,,,.0B")

But if you prefer the file, download it here – Community Downloads -#079

More tips and tricks on formatting data labels:

More Dynamic formatting AWESOMENESS!! | Annotations with dynamic formatting
DAX Fridays #220: SELECTEDMEASURE function
Was this helpful?

Reader Interactions

Let us know your thoughts...

Table of Contents