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.
Hi Guys,
I have a column showing current stock and a column showing required stock holding.
If the required stock holding is >= current stock, I want that to be coloured in Green
If the required stocking holding is < current stock, I want this to be red
When I try to do this in the conditional formatting by selecting 'Field value', whilst I can select the field (cover) it does not show and gives me no further options to complete this condition?
Is this a bug or is there a different way to set this value
Hi @lesg
Your measure may have some issues so that you cannot choose the measure, you can try the following measure:
Measure = if(SUM('Table'[Required Cover])>=SUM('Table'[on Hand]),"Green","Red")
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,
Thanks for that suggestion, however, when I try and add, I get an error:
The cover is a measure created work out how much stock should be required and not an actual column in the table?
Hi @lesg
You can try the following code :
Measure = if([Cover]>=SUM('Table'[on Hand]),"Green","Red")
and you need to put the measure to 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 dont understand what you mean, How can I add the function to the conditional formatting, there is no option to add a measure? as as per my original post, the measure I created, shows in dropdown, but does not show as an option when selected in the dropdown:
Hi @lesg
The measure you have created is a calculated measure, you cannot put it to the conditional formatting, you need to create a measure like the measure I have offered, then you can put it to the conditional formatting, the measure I have created is give the condition to change the color. you can refer to the attachments I supplied above.
and you can refer to the following link:
Conditional Formatting Using Custom Measure - Microsoft Power BI Community
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.
Here you can see that the Sales column has been conditionally formatted based on the values in the Profit Column. Hope this helps
Hi Thanks for that, but does not seem to help im my situation, any numbers I add I dont get any different results.
I assume I use the maximum number? I tried 500 up to your example, 20000:
Yes, you can change Percentage to Number in the Rules dropdown. Also type >= Max in the second rule on the right hand side condition
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
113 | |
97 | |
85 | |
70 | |
61 |
User | Count |
---|---|
151 | |
121 | |
104 | |
87 | |
67 |