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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
Anonymous
Not applicable

get max date from slicer and place result in a table or use in the calender

Hello, 

 

I'm hoping this is a simple request.  My report has a calender table, and another table (All data) with a column.   Date is added at different times to the All data table so I would like users to be able to select a max date in a slicer, which will then inform the last date in the calender.  My calender is working is follows and will there fore pick up the last date of data available for example 19/12/2022: 

 

cal = CALENDAR(Firstdate('All data'[date]),LASTDATE('All data'[date])
 
I would like to users be able to select a date before for reporting the in a slicer which in turn can be used to call or create as the LASTDATE in the calender table.  
 
I had created a measure in the hopes of bringing into a table it obviously works as a card but not on row level for a table. 
Measure 2 = CALCULATE(MAX('All data'[date]), ALLSELECTED('All data'[date]))

In esscense I would like the calender table instead of being from the 1/04/2022 - 19/12/2022 which is the date range in the all data table I would like the LASTDATE to be pulled from the slicer.  The slicer is using the date in the all data table. 
Is this even possible?
 
 
 
1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Anonymous , You can have column like this in date table

 

Date Type = SWITCH(TRUE(),'Date'[Date]=max(fact[date]),"Max Date"
,'Date'[Date]&"")

Default Date Today/ This Month / This Year: https://www.youtube.com/watch?v=hfn05preQYA

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

1 REPLY 1
amitchandak
Super User
Super User

@Anonymous , You can have column like this in date table

 

Date Type = SWITCH(TRUE(),'Date'[Date]=max(fact[date]),"Max Date"
,'Date'[Date]&"")

Default Date Today/ This Month / This Year: https://www.youtube.com/watch?v=hfn05preQYA

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors