Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
I've got two attributes, i.e., forecasts and actual sales. When a month passes, my dax replaces forecast values with actual sales values. If we talk about MTD of forecast, it's working fine, but when it comes to YTD, it reflects the total of forecast by considering its own original values and doesn't account for the replaced values for the total.
My DAXs are as follows:
What could be the solution for this?
I think its failing because the max date is being calculated at the total level, and you need to calculate it at the daily level. Try
OpEx_AOP =
VAR _AOP =
SWITCH (
[Calendar Order],
0, [AOP Selected Value],
1, SUMX ( DATESQTD ( 'Date Table'[Date] ), [AOP Selected Value] ),
2, SUMX ( DATESYTD ( 'Date Table'[Date] ), [AOP Selected Value] )
)
RETURN
_AOP
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 |
|---|---|
| 5 | |
| 5 | |
| 4 | |
| 4 | |
| 3 |
| User | Count |
|---|---|
| 24 | |
| 21 | |
| 12 | |
| 10 | |
| 8 |