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
Anonymous
Not applicable

Conditional Format showing wrong results

Hi Community,

Need your help here. I am having a Total amount, One of the numeric field. I want to apply Conditional Format with Back ground Color on it.

 

pavan_kumar_0-1643956446278.png

The Requement here is when ever the total of the month is less than 3% of Sum of Year ( 19627.88) i need to get Red. 3% to 6% Yellow and (>6% )remaining to Green,
I tried applying "show as a percentage of grand total" option in field value and applied conditional format on top of it its showing wrong results as shown in image below 

pavan_kumar_1-1643956668247.png

pavan_kumar_2-1643956973098.png

I tried creating a DAX measure to it in order to acheive results but its showing wrong back ground color.

% total = DIVIDE(SUM(SalesOrders[Total]),CALCULATE( Sum(SalesOrders[Total]),ALL(SalesOrders)))

and applyed conditional format on top of it. Even it didn't work. Kindly help me with the requirement.

 

 

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi  @Anonymous ,

I created some data:

vyangliumsft_0-1644457892873.png

Here are the steps you can follow:

1. Create measure.

%GT Total =
var _total=SUMX(ALL('Table'),'Table'[amount])
var _group=MAX('Table'[amount])
return
IF(HASONEVALUE('Table'[date]),
DIVIDE(_group,_total),DIVIDE(_total,_total))

vyangliumsft_1-1644457892876.png

format =
SWITCH(
    TRUE(),
    [%GT Total] <=0.03,"red",
    [%GT Total]>0.03&&[%GT Total]<=0.06,"yellow",
    "green")

2. Click Format – Conditional formatting – select [%GT Total] – Background color – Advanced controls.

vyangliumsft_2-1644457892878.png

3. Enter the Background color interface.

Format style – Field value.

vyangliumsft_3-1644457892879.png

4. Result:

vyangliumsft_4-1644457892880.png

 

Best Regards,

Liu Yang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

View solution in original post

4 REPLIES 4
Anonymous
Not applicable

Hi  @Anonymous ,

I created some data:

vyangliumsft_0-1644457892873.png

Here are the steps you can follow:

1. Create measure.

%GT Total =
var _total=SUMX(ALL('Table'),'Table'[amount])
var _group=MAX('Table'[amount])
return
IF(HASONEVALUE('Table'[date]),
DIVIDE(_group,_total),DIVIDE(_total,_total))

vyangliumsft_1-1644457892876.png

format =
SWITCH(
    TRUE(),
    [%GT Total] <=0.03,"red",
    [%GT Total]>0.03&&[%GT Total]<=0.06,"yellow",
    "green")

2. Click Format – Conditional formatting – select [%GT Total] – Background color – Advanced controls.

vyangliumsft_2-1644457892878.png

3. Enter the Background color interface.

Format style – Field value.

vyangliumsft_3-1644457892879.png

4. Result:

vyangliumsft_4-1644457892880.png

 

Best Regards,

Liu Yang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

Anonymous
Not applicable

@Anonymous  Issue got resoled Thanks.

Anonymous
Not applicable

@amitchandak 
Even It didn't Work 

pavan_kumar_0-1643963432192.png

 

amitchandak
Super User
Super User

@Anonymous , Use Number, in place percent, after 0 and 3. and all other lines

 

Also, % is ratio here so it will be between 0 to 1.  like 0 to .03

 

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.