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