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
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
Tan
Advocate I
Advocate I

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