Microsoft is giving away 50,000 FREE Microsoft Certification exam vouchers!
Enter the sweepstakes now!See when key Fabric features will launch and what’s already live, all in one place and always up to date. Explore the new Fabric roadmap
I am trying to color the highest and lowest values by revenue in a chart. I've created measures for max values, min values and then measure for color.
Individually max and min values are working correctly, however when I use them in a color measure, they are giving wrong results.
Measure for Revenue
Measure for Max
Solved! Go to Solution.
Hi @Zeshansaif
While I can't fully explain the reason, I've noticed some peculiar behavior involving context filter sections when using a DAX-generated calendar. My recommendation is to either utilize a calendar table directly from the database or construct one using Power Query. Your formulas appear to be correct. Once I replaced your DAX calendar with my PQ-generated calendar, everything functioned flawlessly.
The updated pbix is attached
More information about date table power query include script is here :
https://radacad.com/create-a-date-dimension-in-power-bi-in-4-steps-step-1-calendar-columns
If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly
Hi @Zeshansaif
Sorry, i didn't check the order of the days.
You can update the formula to :
The updated pbix is attached
Hi @Zeshansaif
Since you haven't attached the data file, I'll try to demonstrate the logic using a simple example of my own.
I created basic model like :
and this is a daily data:
The basic measure is :
The pbix is attached
If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly
Hi, Thanks for Response.
I am sharing drive link of the file. Go to Calender Sheet, in the bar chart I want to highlight highest and lowest. for 2024 it's working but not for other years. I dont know whats the reason.
Thanks.
Power BI File
Hi @Zeshansaif
While I can't fully explain the reason, I've noticed some peculiar behavior involving context filter sections when using a DAX-generated calendar. My recommendation is to either utilize a calendar table directly from the database or construct one using Power Query. Your formulas appear to be correct. Once I replaced your DAX calendar with my PQ-generated calendar, everything functioned flawlessly.
The updated pbix is attached
More information about date table power query include script is here :
https://radacad.com/create-a-date-dimension-in-power-bi-in-4-steps-step-1-calendar-columns
If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly
Hi, Thanks for response.
I found the reason, as soon as I sort the 'day name column' by column 'daynumber', this anomaly appears.
If you find the solution, please let me know. Thanks
Even in your screenshot the sorting is out of order.
Hi @Zeshansaif
Sorry, i didn't check the order of the days.
You can update the formula to :
The updated pbix is attached
Thankyou so much, you are super!!!
Happy to help 🙂
User | Count |
---|---|
91 | |
74 | |
71 | |
58 | |
55 |
User | Count |
---|---|
41 | |
38 | |
34 | |
32 | |
30 |