Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
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 🙂
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
124 | |
79 | |
49 | |
38 | |
37 |
User | Count |
---|---|
196 | |
80 | |
70 | |
51 | |
42 |