Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now

Reply
Nibz
Helper I
Helper I

Slicer last day

Hello,

 

I have a timeline slicer based on the last day, but users can select 7 days before

I would like each day the slicer is in the last day.

 

When a user enter in the report, it is on the last day, but he can change on an onther day if we wants

 

How can I handle that ?

 

 

11 REPLIES 11
v-yuezhe-msft
Microsoft Employee
Microsoft Employee

@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" )

1.JPG

 

Regards,
Lydia

Community Support Team _ Lydia Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Capture.PNG

 

That doesn't work

@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

Community Support Team _ Lydia Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

I am sorry, it is still not goof for me.

 

The new column is ok but it is not possible to select the 1.

 

Capture.PNG

@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

Community Support Team _ Lydia Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Yes I am sure

@Nibz,

I am not able to reproduce your issue in my Desktop, would you please share the data of the Date column for me to test?

Regards,
Lydia

Community Support Team _ Lydia Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Ok but how can I send you the spreadsheet ?

@Nibz

You can upload your file to OneDrive and post the shared link of the file.

Regards,
Lydia

Community Support Team _ Lydia Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

I don't have onedrive...

@Nibz,


I send you my email address via Private message, you can share the file via Email.

Regards,
Lydia

Community Support Team _ Lydia Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

Find out what's new and trending in the Fabric Community.

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

Check out the November 2024 Power BI update to learn about new features.