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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
ajay_gajree
Helper I
Helper I

Extract Latest Month from a Relative Date Slicer to use in a measure

Hi All
Can you extract the max month (last day) from a relative date slicer?

So if my relative date slicer shows the date range

01/04/2019 to 31/07/2019

Can I extract 31/07/2019 using DAX?
1 ACCEPTED SOLUTION
PattemManohar
Community Champion
Community Champion

@ajay_gajree Please try these measures

 

Selected Date Min = MINX(ALLSELECTED('Date'[Date]),[Date])

Selected Date Max = MAXX(ALLSELECTED('Date'[Date]),[Date])

image.png





Did I answer your question? Mark my post as a solution!

Proud to be a PBI Community Champion




View solution in original post

4 REPLIES 4
Anonymous
Not applicable

EndofMonth = EOMONTH(MIN([Date]),1)
Capture.PNG
PattemManohar
Community Champion
Community Champion

@ajay_gajree Please try these measures

 

Selected Date Min = MINX(ALLSELECTED('Date'[Date]),[Date])

Selected Date Max = MAXX(ALLSELECTED('Date'[Date]),[Date])

image.png





Did I answer your question? Mark my post as a solution!

Proud to be a PBI Community Champion




what if we only want the minimum date to be fetched from slicer , but the same date should not be filtered in Matrix for a different visual on same page

 

 

vik0810
Resolver V
Resolver V

HI @ajay_gajree,

 

yes, with MAX Function on your date column, that is filtered by the Slicer. MAX(Table[date]) will return 31/07/2019 in your example.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.