Forum Discussion
Slicer last day
Nibz,
Assume that you have a calendar table, you can create a column using the DAX below, then create a slicer using this column, and select “Yesterday” in the slicer.
Day = IF( DateTable[Date] = TODAY() - 1, "Yesterday", DateTable[Date])
Another option is to create a measure calculating the value of last day, and put the measure into a card. After that, click on the Timeline slicer, select “Edit interactions”, choose “None” in the card visual. This way, when users select days in the timeline slicer, the card visual will not be filtered.
Yesterday Measure =CALCULATE ( SUM ( yourTable[Column] ), FILTER ( ALL ( yourTable), RELATED ( DateTable[Day] ) = "yesterday" )
Regards,
Lydia
That doesn't work
- Anonymous8 years agoNot applicable
Nibz,
Please use the DAX below instead, then create a slicer using this column and set its value to 1.
Yesterday= IF( Reservation[Start] = TODAY() - 1, 1, 0)
Regards,
Lydia- Nibz8 years agoHelper I
I am sorry, it is still not goof for me.
The new column is ok but it is not possible to select the 1.
- Anonymous8 years agoNot applicable
Nibz,
Please make sure that your date column contains the yesterday's date, otherwise you would only get 0 in the calculated colum.
Regards,
Lydia