The ultimate Microsoft Fabric, Power BI, Azure AI, and SQL learning event: Join us in Stockholm, September 24-27, 2024.
Save €200 with code MSCUST on top of early bird pricing!
Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
Hi Guys,
Need help with dealing with an inactive relationship below in HR data.
Context: I am trying to get the total active employees based on the date slicer from date table and the condition am using is max(date) >= joining date, and < last day at work or last day at work = blank.
Output is returning for only last day at work = blank. Can someone please help -.-
as it's not making my DAX work:
Hi @Yolo_pbi ,
Did the above suggestions help with your scenario? if that is the case, you can consider Kudo or Accept the helpful suggestions to help others who faced similar requirements.
If these also don't help, please share more detailed information and description to help us clarify your scenario to test.
How to Get Your Question Answered Quickly
Regards,
Xiaoxin Sheng
Hi @Yolo_pbi not enought infos to provide some sound solution.
Still, try v2
Headcount v2 =
VAR __max_date=MAX('Date'[Date])
RETURN
CALCULATE(
DISTINCTCOUNT(DET[Staff Member]),
FILTER(
DET,
DET[Joined] <= __max_date &&
(
DET[Last Date Worked] > __max_date || ISBLANK(DET[Last Date Worked])
)
)
)
Proud to be a Super User!
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Check out the August 2024 Power BI update to learn about new features.
User | Count |
---|---|
110 | |
76 | |
66 | |
52 | |
52 |
User | Count |
---|---|
127 | |
116 | |
78 | |
64 | |
63 |