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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Thousand Seperator using DAX formula with Conditional formatting

Hi Team,

 

I need to create dashboard showcasing the measure with monthly numbers, but facing few challenge

 

1. How to show Thousand Separator for $ amount

2. How to color-code based on Comparing Target value, some Measure has to be lower and some have a Bigger target

 

 

Measure NameTargetJan-20Feb-20Mar-20Apr-20
Dollar Saved$8,000$28,732$30,900$33,483$43,893
% Customer Satisfaction >8589908795
# of New Employees<1000898985000250500
Saved Hrs on deployment>3hrs7hrs8hrs4hrs8hrs

 

3 REPLIES 3
JustJan
Responsive Resident
Responsive Resident

Hi @Anonymous 

 

The thousand separator is standard functionality and can be found at:

 

2020-07-26 08_37_37-Thousand Seperator using DAX formula with Conditio... - Microsoft Power BI Commu.png

 

If the "normal" conditional formating is not sufficient, you can you the option "Format by Field value", this allows you to assign  colors for any custom calculation:

2020-07-26 08_38_42-Untitled - Power BI Desktop.png

 

Jan

if this is a solution for you, don't forget to mark it as such. thanks

Anonymous
Not applicable

Hi JustJan,

 

Standard Thousand seperator functionality not work as mine columns contains different format like %age, $, # and hrs value. So is there any other way ?

Some Measure created by using formula 

"$"& Text.From (Number.Round ([#"Field Name"],2))

Or 

Text.From (Number.Round([#"Incidents"]*100,2)) & "%"

 

For color coding you have suggested the static while I'm trying to find a dynamic so If Target changed the color coding changed and also looking to code based on % range

 

Green: equal or below the target and with a less than 5% Variance above target. Amber: Above 5% variance of the target. Red: Above 10% variance of the target

OR

Green: equal or above the target and with a less than 5% Variance above target. Amber: Above 5% variance of the target. Red: Above 10% variance of the target

JustJan
Responsive Resident
Responsive Resident

hI @Anonymous 

 

It seems that you calculate your "measure" in m-query.

When you use" Number.ToText(12345,67,"N") you will get a text "12,345.67"

 

The code I suggested is merely an example, you can put any measure / expression that leads to True() (in this case), but if I understand you threshold correctly, than you can use the standard conditional formating by rule, use your calculated percentage in the rules.

JustJan_0-1595869212122.png

 

There is also an option to use percent in the rule, but that does not allow for negative values.

 

So your percentage calculation now drives the colors in the conditional format

 

Jan

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors