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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
ngdata
Regular Visitor

Filter date column other table based on max selected date in slicer.

Hi

I wonder if anyone could help me please. I have a data model consisting of a student table, transaction table and a dimdates table.

 

The students is connected to the transactions via an ID and the DimDates is connected to the transactions table via date. I also have an inactive relationship between Students[StartDate] and the DimDates[Date] table.

Using a DimDates slicer on the page i want to filter out the list of students in my matrix so that the start date <= MAX selected date of this slicer. 


Could someone point me in the right direction please? 

Many thanks for your help. 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi, @ngdata 

 

Based on your description, I have created some measures to achieve the effect you are looking for. Following picture shows the effect of the display.

vyaningymsft_0-1708589257887.png

 

vyaningymsft_1-1708589257890.png

 

Measure:

 

getSlicerDate =

VAR _maxDate =

    CALCULATE ( MAX ( DateSlicer[Date] ) )

VAR _getStartDate =

    SELECTEDVALUE ( Student[StartDate] )

RETURN

    IF ( _getStartDate <= _maxDate, 1, 0 )

 


Best Regards,
Yang
Community Support Team

 

If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

How to get your questions answered quickly --  How to provide sample data in the Power BI Forum

 

 

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Hi, @ngdata 

 

Based on your description, I have created some measures to achieve the effect you are looking for. Following picture shows the effect of the display.

vyaningymsft_0-1708589257887.png

 

vyaningymsft_1-1708589257890.png

 

Measure:

 

getSlicerDate =

VAR _maxDate =

    CALCULATE ( MAX ( DateSlicer[Date] ) )

VAR _getStartDate =

    SELECTEDVALUE ( Student[StartDate] )

RETURN

    IF ( _getStartDate <= _maxDate, 1, 0 )

 


Best Regards,
Yang
Community Support Team

 

If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

How to get your questions answered quickly --  How to provide sample data in the Power BI Forum

 

 

Greg_Deckler
Community Champion
Community Champion

@ngdata Perhaps a Complex Selector like this: The Complex Selector - Microsoft Fabric Community

Selector Measure = 
  VAR __Date = MAX('DimDates'[Date])
  VAR __StartDate = MAX('DimStudents'[StartDate])
  VAR __Result = IF( __StartDate <= __Date, 1, 0 )
RETURN
  __Result

 



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 community update carousel

Fabric Community Update - June 2025

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