Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
Hi Everyone,
I've been exploring Calculation groups recently and love how they've let me clean up my measures. I've just run across a strange issue with only one of the calculation items in my calculation group. The calculation Item is called 'KPI Pass %' and conditional formatting is not working on it even though it is working on two other calc items ('Created' and 'KPI Pass' respectively). Here is an example, the cells in each row should be the same colour:
As you can see the conditional formatting is applied to Created and KPI Pass but not to KPI Pass %.
I also get an error when I try to filter other visuals by selecting a value in the KPI Pass % column. The error is Cannot convert [title of matrix from a measure] of type text to type numeric. I am not sure why its trying to convert the title measure of the other matrix to Numeric. I don't get this error if I select a value in the Created or KPI Pass columns.
KPI Pass % calculation item is based on the other two, DAX:
KPI Pass % =
DIVIDE (
CALCULATE ( SELECTEDMEASURE (), DateTypes[Date Types] = "KPI Pass" ),
CALCULATE ( SELECTEDMEASURE (), DateTypes[Date Types] = "Created" )
)
I think the problem might be that I use SELECTEDMEASURE twice in the one calculation item.
Has anyone else come across this issue or have an suggestions to fix it?
Thank you.
Thanks @amitchandak, I have a measure to assess the current priority and the condiitonal formatting is based on that. For Priority 1, the cell fill shoule be red, for priority 2-4 it should be yellow and then for priority 5-7 it should be green. So the conditional formatting is working for the calculation items 'Created' and 'KPI Pass', but not for the 'KPI Pass %'.
The only difference I can see between the calc items is that the one the conditional formatting is not working for references SELECTEDMEASURE twice. The calculation itself is working correctly, just not the conditional formatting.
Just to follow on from @amitchandak's point around calculation groups and conditional formatting. There are some good sources online about how to use calculation groups with condtional formatting. I've added a link from well renowed Alberto Ferrari from SQL BI discussing a method which involves field parameters.
@JessA , I created a calculation group
Divide1 = divide(CALCULATE(SELECTEDMEASURE(), 'Item'[Brand] = "Brand 1"), CALCULATE(SELECTEDMEASURE(), 'Item'[Brand] = "Brand 2"))
and that is working
For conditional formatting, you should consider measure-based conditional formatting
Please let me know what is exactly you wanted to achieve
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
79 | |
73 | |
57 | |
36 | |
31 |
User | Count |
---|---|
91 | |
60 | |
59 | |
49 | |
45 |