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
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
v-xinruzhu-msft
Community Support
Community Support

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

 

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 

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
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.