Forum Discussion
Date Period Slicer
Hello everyone,
I have a date table with dates from 2014 - today. I need a slicer which contains the values as current, last 1 month , last 3 months and so on. Current should take a value of current date in my table(i.e.. maxdate), last 1 month should take value from current date to 30 days back according to the dates that are present in the data. Nothing should happen according to the calendar dates, all the calculations should be based on the dates that I have.
Thank You.
2 Replies
- v-sihou-msftMicrosoft Employee
To have a last X days date period slicer, you can to create one calculated table for each "Last X Days" scenario and union them into a DatePeriod table. For more details, please refer to article below:
Power BI – Time Period Slicer for Last 7 Days,Last 30 Days..
Regards,
- pxg08680Resolver III
According to the link that you provided, after doing all those I get the data this way, for last 1 Month I get the in between data from today to last 1 month.
ex: my date table has last date as 2017-09-29. so when I select Last 1 Month my date goes back to 2017-09-01 and gives me all the data present in those days but I need it only for 2017-09-01.
Same scenario for Last 3 Months, I need data only for 2017-06-29 not the in between data for all the dates.
Thank you