The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.
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?
Hi @Anonymous ,
One sample for your reference, please check the following steps as below.
1. Create relationship between tables as below.
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]))
Pbix as attached.
@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.
User | Count |
---|---|
65 | |
60 | |
55 | |
54 | |
31 |
User | Count |
---|---|
180 | |
88 | |
70 | |
46 | |
46 |