Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hi,
I am very puzzled by this behaviour and want to seek community members advise. I am trying to determine Min/Max values of a chart using the DAX formula below:-
MaxOppWonValue_MthName =
MAXX (
ALLSELECTED ( 'Calendar'[Mth] ),
[OppWonValue]
)
MinOppWonValue_MthName =
MINX (
ALLSELECTED ( 'Calendar'[Mth] ),
[OppWonValue]
)
where [OppWonValue] is
OppWonValue =
CALCULATE (
SUM ( 'Opportunities'[Revenue] ),
'Opportunities'[Status] = "Won"
)
The issue is when I use the Mth column in Calendar table (eg Jan, Feb, Mar, Apr ...) as the common axis on the chart, the charts do not show the correct Min/Max values.
However, if I change the DAX formulas to MonthNumberOfYear and the chart axis to the MonthNumberOfYear, the calculations work.
MaxOppWonValue_MthNumber =
MAXX (
ALLSELECTED ( 'Calendar'[MonthNumberOfCalendarYear] ),
[OppWonValue]
)
MinOppWonValue_MthNumber =
MINX (
ALLSELECTED ( 'Calendar'[MonthNumberOfCalendarYear] ),
[OppWonValue]
)
What am I doing wrong or missing here?
Solved! Go to Solution.
An very hidden pitfall of "Sort by Column" setting. You may refer to this article,
Side effects of the Sort By Column setting in DAX - SQLBI
MinOppWonValue_MthName =
MINX (
ALLSELECTED ( 'Calendar'[Mth] ),
CALCULATE([OppWonValue], ALL('Calendar'[MonthNumberOfCalendarYear]))
)
| Thanks to the great efforts by MS engineers to simplify syntax of DAX! Most beginners are SUCCESSFULLY MISLED to think that they could easily master DAX; but it turns out that the intricacy of the most frequently used RANKX() is still way beyond their comprehension! |
DAX is simple, but NOT EASY! |
Wow, thanks for the quick response. I remember reading that particular article and making a mental note for future (which obviously didn't help in this instance hahaha).
End result that I was trying to achieve:
An very hidden pitfall of "Sort by Column" setting. You may refer to this article,
Side effects of the Sort By Column setting in DAX - SQLBI
MinOppWonValue_MthName =
MINX (
ALLSELECTED ( 'Calendar'[Mth] ),
CALCULATE([OppWonValue], ALL('Calendar'[MonthNumberOfCalendarYear]))
)
| Thanks to the great efforts by MS engineers to simplify syntax of DAX! Most beginners are SUCCESSFULLY MISLED to think that they could easily master DAX; but it turns out that the intricacy of the most frequently used RANKX() is still way beyond their comprehension! |
DAX is simple, but NOT EASY! |
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
| User | Count |
|---|---|
| 57 | |
| 44 | |
| 42 | |
| 21 | |
| 17 |
| User | Count |
|---|---|
| 183 | |
| 114 | |
| 93 | |
| 61 | |
| 45 |