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

A new Data Days event is coming soon! This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. Don't miss out.

Reply
Anonymous
Not applicable

How to select Max date in a "between" type date slicer

Hi,

I am using "between" type slicer for dates to filter two tables. one is for day basis data and another is for MTD.

 

In Between Slicer, i'm selecting dates 1st to 9th of September.

 

In MTD table, it is working fine as there i need data of 1st to 9th of September.(This is completed)


Another table needs to filter only for last date which is 9th of september in this case.

 

How to solve this.

Need help.
Thanks,
Gaurav

2 ACCEPTED SOLUTIONS
amitchandak
Super User
Super User

@Anonymous , Try like


measure =
var _max =maxx(allselected(date), Date[date])
return
calculate([measure], filter(Date, Date[date] =_max))

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

Hi @Anonymous ,

 

You can use the following filter in your measure(Use date column in Date table for slicer). For MTD table:

 

FILTER(ALL(MTD TABLE),MTD TABE[Date] IN VALUES(Date[Date]))

 

For another table:

 

FILTER(ALL(ANOTHER TABLE),ANOTHER TABE[Date]= MAX(Date[Date]))

 

 

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

 

Best Regards,

Dedmon Dai

 

View solution in original post

4 REPLIES 4
amitchandak
Super User
Super User

@Anonymous , Try like


measure =
var _max =maxx(allselected(date), Date[date])
return
calculate([measure], filter(Date, Date[date] =_max))

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
Anonymous
Not applicable

Hi @

measure =
var _max =maxx(allselected(date), Date[date])
return
calculate([measure], filter(Date, Date[date] =_max))

This measure is the Calculated measure used or above measure.If this is calculated measure then how i'll solve the same for 5 measure and one count(value) coming from table.

Hi @Anonymous ,

 

You can use the following filter in your measure(Use date column in Date table for slicer). For MTD table:

 

FILTER(ALL(MTD TABLE),MTD TABE[Date] IN VALUES(Date[Date]))

 

For another table:

 

FILTER(ALL(ANOTHER TABLE),ANOTHER TABE[Date]= MAX(Date[Date]))

 

 

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

 

Best Regards,

Dedmon Dai

 

Fowmy
Super User
Super User

@Anonymous 


You can get the last date using te following function and use it in your formula.

_LastDate = MAX(Dates[Date])

________________________

If my answer was helpful, please consider Accept it as the solution to help the other members find it

Click on the Thumbs-Up icon if you like this reply 🙂

YouTube  LinkedIn

Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

Helpful resources

Announcements
May Power BI Update Carousel

Power BI Monthly Update - May 2026

Check out the May 2026 Power BI update to learn about new features.

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.