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 September 15. Request your voucher.

Reply
Anonymous
Not applicable

Date slicer - multiple visualizations with different date types?

Here is what I'm working with

 

2 tables; a standard calendar table and a employee table.  The employee table has both a hire date and a separation date (this column has some blanks in it due to not every employee is separated)

 

I would like to have a date slicer using the calendar table to show say how many employees were hired in April and how many left the company in April.

 

Since I can only have one active relationship, I can't get visualizations to work at the same time for both the hire date and separation date.

 

Is there a way to make this possible?

3 REPLIES 3
v-frfei-msft
Community Support
Community Support

Hi @Anonymous ,

 

One sample for your reference, please check the following steps as below.

1. Create relationship between tables as below.

Capture.PNG

 

2. Create two measures to get the excepted result we need.

 

hire in = COUNTROWS(Table1)
sep = CALCULATE(COUNTROWS(Table1),USERELATIONSHIP('Table'[Date],Table1[separation date]))

 

2.PNG

Pbix as attached.

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.
Anonymous
Not applicable

@v-frfei-msft   on one of your tables, you have 3 separation dates in April but the card only shows 1.  Is that because 2 of them also have a hire date in April?

 

I would like for both cards to count all hire dates and all separation dates and not cancel each other out if the hire and separation date was all in the same month if that is what is happening

Hi  @Anonymous ,

 

Kindly share your sample data and excepted result to me if you don't have any Confidential Information. Please upload your files to One Drive and share the link here.

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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