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
And here is the code for the formatting:
VAR salesMeasure = [Total Sales] return SWITCH(TRUE(), salesMeasure<100000,"0", 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:
Was this helpful?
Let us know your thoughts...