The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
I have a KPI visual showing average days to hire and slicers by facility and date. The conditional formatting is not working if multiple dates or facilities are selected. I feel like this should be a simple DAX code, but I can’t seem to figure out the right syntax. It appears the color is based off the total or last record, rather than slicer selections.
Here is the data I’m using (there is more in the full table).
This is the KPI visual I’m using:
As you can see for this KPI with all facilities and dates selected the color appears to work, but I think it is coincidence. If I filter for a specific facility (i.e., OHBH), it shows green but should be yellow, and the table when filtered shows all facilities but has blanks in the Average Days to Hire column.
And here is the KPI when filtered, as you can see it’s green which aligns with the Total value in the table and the last facility (that is excluded from the filter), rather than the most recent date of April 2024 for OHBH. Should be yellow.
When filtered for only April, the color in the KPI visual works.
Average Days to Hire Measure:
RYG Days to Hire Measure:
Using RYG Days to Hire in KPI Visual Conditional Formatting (used in all: Good, Neutral, & Bad color):
Initially tried using rules for conditional formatting off of the Average Days to Hire, but that didn’t work either.
Thanks for taking the time to review.
Hi @andreaslemp ,
Base on your description, it seems like the conditional formatting on KPI visual is not working when select multiple months. However, it works well when select single month. Could you please provide some raw data in your table 'Days to Hire_Drilldown' (exclude sensitive data) with Text format and your expected result with backend logic and special examples? It would be helpful to find out the solution. You can refer the following link to share the required info:
How to provide sample data in the Power BI Forum
And it is better if you can share a simplified pbix file. You can refer the following link to upload the file to the community. Thank you.
How to upload PBI in Community
Best Regards
User | Count |
---|---|
27 | |
12 | |
8 | |
8 | |
5 |
User | Count |
---|---|
31 | |
15 | |
12 | |
7 | |
6 |