Forum Discussion
MAX showing incorrect value
- 9 years ago
Thanks for the response but as mentioned, my calendar table's maximum value is the current date so it should be 7/18.
But I've figured out where I went wrong. By adding a .[Date] after Calendar[Date], the measure uses the hidden table created by PBI desktop's time intelligence featture. Removing .[Date] solves the problem.
Hi danextian,
The question is that you are using the ALL and by doing that you discard all the filter you have on the Calendar date and return the maximum value of the full table ignoring all the rest of the filters you need to do something like this:
MaxDate with Calculatte ALLSELECTED = CALCULATE ( MAX ( Calendar[Date] ), ALLSELECTED ( 'Calendar'[Date] ) )
As you can see below I have made a print with your two formulas and mine with a slicer see the result:
Regards,
Mfelix
Thanks for the response but as mentioned, my calendar table's maximum value is the current date so it should be 7/18.
But I've figured out where I went wrong. By adding a .[Date] after Calendar[Date], the measure uses the hidden table created by PBI desktop's time intelligence featture. Removing .[Date] solves the problem.
- v-yulgu-msft9 years ago
Microsoft Employee
Hi danextian,
Thanks for your sharing. Please kindly mark the corresponding resolution as an answer so that it can benefit more users.
Thanks,
Yuliana Gu
- Anonymous6 years agoNot applicable
Thanks danextian . Sometimes a big problem can be solved with simple solutions. Your suggestion here made my day peaceful.
- danextian6 years ago
Super User
Hi Anonymous ,
This was from my early DAX days when I was still a newbie and not yet a super user.