Forum Discussion
Anonymous
6 years agoNot applicable
Control Range Date by Dropdown filter
Hi all, I have a table calendar with data in each hour. I created a slicer for date between. I want to create a dropdown list which calculate today, last 7 days,... and when I choose one value,...
- 6 years ago
Hi Anonymous
A workaround below:
Create a date table
date = CALENDAR(MIN('Table'[date]),TODAY())add a column
slicer item = SWITCH ( TRUE (), [Date] = TODAY (), "today", DATEDIFF ( [Date], TODAY (), DAY ) <= 7 && [Date] < TODAY (), "last 7 days", DATEDIFF ( [Date], TODAY (), DAY ) <= 30 && [Date] < TODAY (), "last 30 days" )Then edit interactions as below
Best Regards
Maggie
Community Support Team _ Maggie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
amitchandak
6 years agoSuper User
You can create a slicer like : https://community.powerbi.com/t5/Desktop/Slicer-MTD-QTD-YTD-to-filter-dates-using-the-slicer/td-p/500115