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
Ramees_123
Helper IV
Helper IV

Measure OR Calculated column based on the Date selected in slicer

Below is the relationship with my employees and date table. 

Start Date of employment has active relationship and last date of employnment has inactive relationship.

 

I have a date hierarchy slicer where I could select whole year, quater, month and date too.

 

When I select a date, I need to get the count of employees based on below formula. 

 

Start Date <= Slicer Selected Date

Last Date >= Slicer Selected Date OR Last Date is Blank.

 

This should work even when multiple dates are selected in the slicer.

 

How to do this ? Please help.

 

Ramees_123_0-1619337896267.png

 

1 ACCEPTED SOLUTION
TomMartens
Super User
Super User

Hey @Ramees_123 , the challenge you are facing has a name "events-in-progress", this article Events-In-Progress | Gerhard Brueckl on BI & Data (gbrueckl.at) provides a solution to a special requirement but also contains links to other articles.

I recommend starting with the article by Jason Thomas.

 

If the articles are not sufficient, create a pbix that contains sample data and upload the pbix to onedrive or dropbox and share the link. If you are using xlsx to create the sample data instead of manual input, share the xlsx as well. Please also describe why the approach described in the articles did not work. Make sure that you reference the sample data when you describe the expected result, especially when you are using more than one date..

 

Regards,

Tom



Did I answer your question? Mark my post as a solution, this will help others!

Proud to be a Super User!
I accept Kudos 😉
Hamburg, Germany

View solution in original post

1 REPLY 1
TomMartens
Super User
Super User

Hey @Ramees_123 , the challenge you are facing has a name "events-in-progress", this article Events-In-Progress | Gerhard Brueckl on BI & Data (gbrueckl.at) provides a solution to a special requirement but also contains links to other articles.

I recommend starting with the article by Jason Thomas.

 

If the articles are not sufficient, create a pbix that contains sample data and upload the pbix to onedrive or dropbox and share the link. If you are using xlsx to create the sample data instead of manual input, share the xlsx as well. Please also describe why the approach described in the articles did not work. Make sure that you reference the sample data when you describe the expected result, especially when you are using more than one date..

 

Regards,

Tom



Did I answer your question? Mark my post as a solution, this will help others!

Proud to be a Super User!
I accept Kudos 😉
Hamburg, Germany

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.