This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. We're covering it all. You won't want to miss it.
Learn moreLevel up your Power BI skills this month - build one visual each week and tell better stories with data! Get started
Hello, i'm trying to calculate the net gain or loss using two different date columns. One column is 'join date' and the other is called 'leave date'. Join date always has a value and leave date might not if someone is still active.
I'm not sure how to do this in DAX as i need to COUNT distinct ID's, for both date columns and then calculate the difference between each yearly value:
Any ideas?
thanks
Solved! Go to Solution.
Hi @rogerdea ,
You will need to unpivot the columns JoinDate and LeaveDate.
Click on Unpivot Columns
After unpivoting your table will look like below.
Create a Calculated Column
Regards,
Harsh Nathani
Did I answer your question? Mark my post as a solution! Appreciate with a Kudos!! (Click the Thumbs Up Button)
Hi @rogerdea ,
You will need to unpivot the columns JoinDate and LeaveDate.
Click on Unpivot Columns
After unpivoting your table will look like below.
Create a Calculated Column
Regards,
Harsh Nathani
Did I answer your question? Mark my post as a solution! Appreciate with a Kudos!! (Click the Thumbs Up Button)
Hi roger
Why does 1212, 2099 and 1313 rejoin in overlapping periods and how do you want these overlaps counted please?
Check out the April 2026 Power BI update to learn about new features.
Sign up to receive a private message when registration opens and key events begin.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
| User | Count |
|---|---|
| 5 | |
| 4 | |
| 3 | |
| 3 | |
| 3 |