The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
Hello , I need help. Can we change the today date (1/29/2024) to custome date in Relative Date Slice ? I need to change it to the date when data last update. Thanks before.
Solved! Go to Solution.
Since the relative option doesnt include today I've approached this with bookmarks. Assuming the last updated date you're anchoring on is at the model level then this is what I would do.
1. add a column to a date dimension that is a Yes/No for the last date. I did this in Power Query. Load this to your model.
2. Added two slicers to the page. One for the LastDateDataUpdatedYN column and the second for relative dates. Both columns come from the date dimension in the model.
3. I set up two bookmarks. One that catches the state of the LastDateDataUpdatedYN set to Yes and the other where nothing is selected. I set the bookmark to remember the data, display, and selected visuals. Selecting the data will remember the selections in the slicer.
4. I added a card and bookmark navigator to the page to clean up the behavior I want the end user to experience. This part is optional and totally up to how you want the page to feel. I wanted to demonstrate how the bookmark can tie it together.
Here is what it looks like when 'Today' is selected. Notice what is visible in the Dates group on the selection pane.
Here is what it looks like when 'Relative Dates' is selected. Again, notice what is visible in the Dates group on the selection pane.
Since the relative option doesnt include today I've approached this with bookmarks. Assuming the last updated date you're anchoring on is at the model level then this is what I would do.
1. add a column to a date dimension that is a Yes/No for the last date. I did this in Power Query. Load this to your model.
2. Added two slicers to the page. One for the LastDateDataUpdatedYN column and the second for relative dates. Both columns come from the date dimension in the model.
3. I set up two bookmarks. One that catches the state of the LastDateDataUpdatedYN set to Yes and the other where nothing is selected. I set the bookmark to remember the data, display, and selected visuals. Selecting the data will remember the selections in the slicer.
4. I added a card and bookmark navigator to the page to clean up the behavior I want the end user to experience. This part is optional and totally up to how you want the page to feel. I wanted to demonstrate how the bookmark can tie it together.
Here is what it looks like when 'Today' is selected. Notice what is visible in the Dates group on the selection pane.
Here is what it looks like when 'Relative Dates' is selected. Again, notice what is visible in the Dates group on the selection pane.
User | Count |
---|---|
87 | |
84 | |
36 | |
35 | |
30 |
User | Count |
---|---|
96 | |
74 | |
67 | |
52 | |
51 |