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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

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
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

Power BI Carousel June 2024

Power BI Monthly Update - June 2024

Check out the June 2024 Power BI update to learn about new features.

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.