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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
sdionne
Frequent Visitor

Date Slicer, Set a specific date at opening

Hello all, II not found exactly what I am looking for.
I have a slicer by date (Calendar by Tallan) and when I open the report I want that the selected date is the max date, sometime the max date is yesterday, and sometime is 2 or 3 days before today.
And with Calendar by Tallan I can select any date after the report is open, but at the opening I want the max date.
Can you help?
Thanks

sdionne

1 ACCEPTED SOLUTION

Hi @sdionne,

 

The column should be in the table [Calendrier]. The formula could be as follows. Then it will work with the dates. 

 

Column =
VAR maxDate = MAX ( StatProcessus[Hier] ) RETURN IF ( [Date] = maxDate, 1, 0 )

 

BTW, make sure you didn't share anything sensitive.

 

Best Regards,

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

View solution in original post

9 REPLIES 9
PattemManohar
Community Champion
Community Champion

@sdionne Select the Max Date in the slicer and save the pbix file. Or you can have a report level filter set to MaxDate flag (create a supporting column to flag the max date).





Did I answer your question? Mark my post as a solution!

Proud to be a PBI Community Champion




I think my knowledge are not so good, so can you give me more explanation?

Thanks

sdionne

Hi Sdionne,

 

The details of @PattemManohar's idea are as follows.

1. Select the max date in the slicer and save the file. It's the max date in the next opening.

2. Add a column like below.

IsMax =
VAR maxDate =
    CALCULATE ( MAX ( 'Calendar'[Datekey] ), ALL ( 'Calendar' ) )
RETURN
    IF ( [Datekey] = maxDate, 1, 0 )

Date-Slicer-Set-a-specific-date-at-opening

 

 

Best Regards,

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

Hello v-jiascu-msft,

it is pretty much what I am looking for, but because I want that the max date is selected when I open the report and I want to be able to choose any date in a calendar like Calendar by Tallan, I must have 2 segments.
Also, when I open the report indeed the max date is selected, if I change the IsMax to 0, I can select an another date in calendar, but if I select again IsMax to 1, I must reselect the date, it is not automatic to 22 like I opened the report.

 

See Example

 

I hope these explanation are clears.
Thanks
sdionne

Hi Sdionne,

 

This is a workaround for opening the file with the max date. So you can clear the slicer to move to other operations. 

If you create the column along the date column, the selection of IsMax equals to the date 22. You don't have to select the date at the same time.

 

Best Regards,

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

unfortunately, i tried but it is not working, can you show me an example or give me more details please.
Thanks
sdionne

Hi @sdionne,

 

The snapshots in my last post are quite clear. Can you share your example again? I can't access the link in your last post.

 

 

Best Regards,

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

hello, see link to pbix

PBIX Example

 

Thanks

sdionne

 

Hi @sdionne,

 

The column should be in the table [Calendrier]. The formula could be as follows. Then it will work with the dates. 

 

Column =
VAR maxDate = MAX ( StatProcessus[Hier] ) RETURN IF ( [Date] = maxDate, 1, 0 )

 

BTW, make sure you didn't share anything sensitive.

 

Best Regards,

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

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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