Forum Discussion
Independent date slicers
Hi all,
I have three date slicers. Two of them select the Start date and the End date.
There is another Yesterday slicer, which should filter only yesterday's data.
The issue is that, the Yesterday slicer doesn't work separately. If I select certain start&end dates and after that I try to select the Yesterday filter, the data in my table appear for the period in the Start/End slicer, not for the yesterday one.
Any idea how the yesterday filter can work even the Start/End date are on. I can't disable the Start/End date interaction with the Data table.
Thank you.
Anonymous , you can use time intelligence for that
Last Day = CALCULATE(sum('order'[Qty]), FILTER(ALL('Date'),'Date'[Date]=max('Date'[Date])-1))
Last Day = CALCULATE(sum('order'[Qty]), previousday('Date'[Date]))Day behind Sales = CALCULATE(SUM(Sales[Sales Amount]),dateadd('Date'[Date],-1,Day))
But all this work better with a date table.
To get the best of the time intelligence function. Make sure you have a date calendar and it has been marked as the date in model view. Also, join it with the date column of your fact/s. Refer :
https://radacad.com/creating-calendar-table-in-power-bi-using-dax-functions
Also refer to how to use the same date table for two dates https://community.powerbi.com/t5/Community-Blog/HR-Analytics-Active-Employee-Hire-and-Termination-trend/ba-p/882970
Appreciate your Kudos.
2 Replies
- amitchandak
Super User
Anonymous , you can use time intelligence for that
Last Day = CALCULATE(sum('order'[Qty]), FILTER(ALL('Date'),'Date'[Date]=max('Date'[Date])-1))
Last Day = CALCULATE(sum('order'[Qty]), previousday('Date'[Date]))Day behind Sales = CALCULATE(SUM(Sales[Sales Amount]),dateadd('Date'[Date],-1,Day))
But all this work better with a date table.
To get the best of the time intelligence function. Make sure you have a date calendar and it has been marked as the date in model view. Also, join it with the date column of your fact/s. Refer :
https://radacad.com/creating-calendar-table-in-power-bi-using-dax-functions
Also refer to how to use the same date table for two dates https://community.powerbi.com/t5/Community-Blog/HR-Analytics-Active-Employee-Hire-and-Termination-trend/ba-p/882970
Appreciate your Kudos.- AnonymousNot applicable
Hi amitchandak,
Thank you. I will use that. But just for a confirmation- there is no option for making Yesterday slicer to work over the other ones with the current view?
Thank you.