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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Jackie_Zhang
Regular Visitor

Can't change the rule in conditional rules

I created a metic as below:

GMOZHU = CALCULATE(SUM('budget2023'[2023]),FILTER('budget2023','budget2023'[Cost Center]=60300010))-CALCULATE(SUM('Act2023'[Sum2023]),FILTER('Act2023','Act2023'[Cost Center]=60300010))
But I can't change the rule in conditional rules as attached picture.
Is there anyone can help me to explain what should I do??
Jackie_Zhang_0-1680424786738.png

 

6 REPLIES 6
Anonymous
Not applicable

Hi @Jackie_Zhang 

You need to change your measure. 

e.g 

GMOZHU = var a=CALCULATE(SUM('budget2023'[2023]),FILTER('budget2023','budget2023'[Cost Center]=60300010))-CALCULATE(SUM('Act2023'[Sum2023]),FILTER('Act2023','Act2023'[Cost Center]=60300010))
return if(a>=0.33&&a<0.67,1,2)

Then set it to the conditional formatting.

vxinruzhumsft_0-1680489074934.png

 

Best Regards!

Yolo Zhu

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

Hi Yolo,

I tried to use the measure, but I got below result:

1. I got the value 1 or 2, which isn't the result I want. I need got the amount value, not 1 or 2 bu VAR.

Jackie_Zhang_0-1680577442056.png

2. I still can't change the rule after I change the measure which you provided.

Jackie_Zhang_1-1680577724839.png

 

Thank you for you help, I am not sure why I can't add conditional formatting to this measure.

Please give me some suggestion on it.

 

BR,

Jackie

 

Anonymous
Not applicable

Hi @Jackie_Zhang 

After testing, the measure can be used in conditonal formatting well

vxinruzhumsft_0-1680585484587.png

 

Try to remove the field from the visual, then add the field to the visual again, and then set the conditional formatting.

 

Best Regards!

Yolo Zhu

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

 

Hi Yolo,

 

    I tried to remove the measure, then added it back. When I tried to add conditional fomatting on this measure, I got the same problem.... I still can't change the rule...

 

BR,

Jackie 

Anonymous
Not applicable

Hi @Jackie_Zhang 

After trying, in the matrix, if you do not place the row table or list, only put the value, at this time the rule cannot be set, do you only place the value without placing the row header or column header?

vxinruzhumsft_0-1680590378288.png

 

Atfer putting the column field.

vxinruzhumsft_1-1680590410336.png

 

Best Regards!

Yolo Zhu

Jackie_Zhang
Regular Visitor

Picture update.

Jackie_Zhang_0-1680425753316.png

 

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.