Forum Discussion
DavidKress
8 years agoFrequent Visitor
Dynamically changing Date slicer
Hi I'm working off an SQL Analysis Server cube and have created a couple of DAX measures which calculate the difference in sales from the same day the prior year. I have a table which shows end cust...
- 8 years ago
I think you can try to use Power Query to create a new table which is containing today and 7 days before today. Then use this table value as slicer.
Please refer:
1. Go to Edit Queries, create a new blank query with Power Query script:
= {Date.AddDays(Date.From(DateTime.LocalNow()),-7),Date.From(DateTime.LocalNow())}2. Change List to Table. Then you can get the dynamica today and 7 days before today.
Thanks,
Xi Jin.
MFelix
Super User
8 years agoHi DavidKress,
In the visual filter add in the Date column and the select Relative date filtering then change to the option in the last 7 days should work you have also several options like next days, months weeks, ...
Regards,
MFelix