cancel
Showing results for 
Search instead for 
Did you mean: 
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))

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

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
Join Arun Ulag at MPPC23

Join Arun Ulag at MPPC23

Get a sneak peek into this year's Power Platform Conference Keynote.

PBI Sept Update Carousel

Power BI September 2023 Update

Take a look at the September 2023 Power BI update to learn more.

Learn Live

Learn Live: Event Series

Join Microsoft Reactor and learn from developers.

Dashboard in a day with date

Exclusive opportunity for Women!

Join us for a free, hands-on Microsoft workshop led by women trainers for women where you will learn how to build a Dashboard in a Day!

Top Solution Authors