Forum Discussion
MAX Date wrong / Strange MAX DATE behavior
Hello!
I've stumbled across a strange MAX DATE behavior.
Example 1
Dec 30 selected. All OK
Example 2
Dec 31 2021 selected. All MAX are wrong
BUT all is well when Dec 30 2020 is selected
Fll formats are in order
Date table is also ok
Attaching sample hereto.
Would appreciate any help or view. Thank you
Hi Anonymous ,
Microsoft has given its internal response. This behavior is by design. There are 2 aspects collaborating together:
1. The filter on Year = 2019, 2020, 2021 applies solely to the values that are selectable in the slicer. That filter won't propagate anywhere else.
2. A behavior of the range slicer is that if the customer does not move the slider at both ends, as shown in the figure below, there is effectively no filter applied.
So if you never changed the ends of the range, either by dragging the slider or typing in a value, or if you selected the values that are the Min or Max, the filter won't do anything in actuality. This is to allow scenarios where one of the ends keeps changing (e.g. more days of data have been brought in so the filter remains dynamic to that and applies the latest date instead of a static date).
I would recommend you use the Y column to create another slicer.
If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
Best Regards,
Winniz
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
5 Replies
- v-kkf-msft
Community Support
Hi Anonymous ,
Microsoft has given its internal response. This behavior is by design. There are 2 aspects collaborating together:
1. The filter on Year = 2019, 2020, 2021 applies solely to the values that are selectable in the slicer. That filter won't propagate anywhere else.
2. A behavior of the range slicer is that if the customer does not move the slider at both ends, as shown in the figure below, there is effectively no filter applied.
So if you never changed the ends of the range, either by dragging the slider or typing in a value, or if you selected the values that are the Min or Max, the filter won't do anything in actuality. This is to allow scenarios where one of the ends keeps changing (e.g. more days of data have been brought in so the filter remains dynamic to that and applies the latest date instead of a static date).
I would recommend you use the Y column to create another slicer.
If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
Best Regards,
Winniz
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly. - amitchandak
Super User
Anonymous , what us wrong in example 2? Seem all ok.
If max('Date'[Date]) is used in a context, that it will give max date from that context
- AnonymousNot applicable
The problem is that the problem occurs notwithstanding the context. I would concur if the problem persisted with both 2020 AND 2021. But it occurs only with 2021 😞 and only with 31 dec.
I've extracted it from the bigger model where it wrecks havoc with last day in month/year measures.
- amitchandak
Super User
Anonymous , to me all seem fine on card visual. Only thing is that the report date for 31-dec is 30 Dec, which will only be used if we use that column in measure.
Sorry, I am still not able to get the exact issue
- v-kkf-msft
Community Support
Hi Anonymous ,
This is because you have filtered the Date - Year in the filter pane of the date slicer. For example, if I select 2019 and 2020, then when the date in the slicer is 12/31/2020, the maximum value shows 12/31/2022.
I have reported this bug internally. If there is any update, I will let you know. Thanks for your patience.
Maybe you could put the Date - Year column in another slicer instead of the filter pane as a temporary solution.
Best Regards,
Winniz
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.