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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
TBSST
Frequent Visitor

Having two dates filtered through one date filter

Hi all, 

 

i am trying have multiple viuslisatiosn that use different dates to be filtered with one date slicer. 

 

I currently have a callender table, which i would like 'the date' to be the main slicer. All dates are on seperate tables. With the DAX i am using, i would like to have a distinctcount of all users, and then for them to be filtered by entery date and another viusaltion to be filtered through exit date. So when change 'the date' slicer, the visulations with entry dates will show users who had an entry date between that period of time, and the visulisations with the exit date to show the exit dates between the period of time. 

 

Although with the DAX, when using 'The date' slicer, it is not showing the correct numbers.

 

Clients = CALCULATE(DISTINCTCOUNTNOBLANK(table[clientID]), FILTER(entry, entry[EntryDate] <=MAX('Calendar'[TheDate] && (entry, entry[EntryDate] >=MIN('Calendar'[TheDate]))))
 
any help would be appreciated. 

Thank you. 
1 REPLY 1
JoeBarry
Solution Sage
Solution Sage

Hi @TBSST 

 

Not sure what this means All dates are on seperate tables are exits and entries in different tables? If they are in the same table do this below

 

Create a a one to many relationship between the date column in the Date table and the entry date and the same relationship with the exit date. This relationship will be inactive. 

 

New Entries = DISTINCTCOUNT(table[ClientID])

 

Exits = CALCULATE(DISTINCTCOUNT(table[ClientID]),
USERELATIONSHIP(table[ExitDate], DateTable[Date])

 

 

If they are in seperate tables, create a one to many relationship with the dates. Remove the USERELATIONSHIP from the 2nd measure and then add  them to the visuals. 

 

Thanks

Joe

 

If this post helps, then please Accept it as the solution

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

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

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

Top Solution Authors