Forum Discussion
Powerbi Default view
- 3 months ago
Hello g-zakkour,
Thanks for the follow-up.
If your goal is for the date slicer itself to automatically change its selected value based on the Historical/Predicted slicer, then unfortunately this isn't supported in Power BI. DAX measures cannot programmatically set or update a slicer's selected value.
The approach I suggested is intended to provide the same report behavior rather than changing the slicer itself:
- Keep the date slicer available so users can manually override the date.
- Use an IsDefaultPeriod measure (or incorporate the logic into your measures) to display the latest historical date or TODAY() by default in the visuals.
- Once the user selects a different date, that selection naturally takes precedence.
If having the slicer automatically change is a hard requirement, the closest alternatives are:
- Separate Historical and Predicted report pages.
- Bookmarks with predefined slicer states.
- A custom navigation experience.
Could you clarify whether your requirement is:
- The visuals should show the correct default period, or
- The date slicer itself must automatically change its selected value?
That will help determine the best approach.
Best regards,
Omkar Shinde
Microsoft Fabric Enthusiast | Power BI Consultant
💡 If you found this response helpful, please consider giving it a Kudos.
✅ If this resolves your question, please mark it as the Accepted Solution to help others in the community.
hello Omkar_1712
so after doing the calculations i apply it to all the visuals including the date picker? or without the date picker?
Hello g-zakkour,
Thanks for the follow-up.
If your goal is for the date slicer itself to automatically change its selected value based on the Historical/Predicted slicer, then unfortunately this isn't supported in Power BI. DAX measures cannot programmatically set or update a slicer's selected value.
The approach I suggested is intended to provide the same report behavior rather than changing the slicer itself:
- Keep the date slicer available so users can manually override the date.
- Use an IsDefaultPeriod measure (or incorporate the logic into your measures) to display the latest historical date or TODAY() by default in the visuals.
- Once the user selects a different date, that selection naturally takes precedence.
If having the slicer automatically change is a hard requirement, the closest alternatives are:
- Separate Historical and Predicted report pages.
- Bookmarks with predefined slicer states.
- A custom navigation experience.
Could you clarify whether your requirement is:
- The visuals should show the correct default period, or
- The date slicer itself must automatically change its selected value?
That will help determine the best approach.
Best regards,
Omkar Shinde
Microsoft Fabric Enthusiast | Power BI Consultant
💡 If you found this response helpful, please consider giving it a Kudos.
✅ If this resolves your question, please mark it as the Accepted Solution to help others in the community.