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.
Hi,
I'm using the below to give me the number of weeks someone has been employed.
Wks of Employment = DATEDIFF(vw_PivotVisitsInvoiced[Carer_StartDate],TODAY(),WEEK)
Works great however in another table CarersList there is an end date column [DateLeft].
Those still employed will have no end date.
How do I modify the above to account for those who have an end date?
Solved! Go to Solution.
It appears to be some data quality. Here is another approach:
On your vw_PivotVisitsInvoiced table create the following calculated column: CarerLastDate = RELATED(CarersList[DateLeft])
This will create another column populated with DateLeft values.
From here you can write another calc column:
DATEDIFF(vw_PivotVisitsInvoiced[Carer_StartDate],PivotVisitsInvoiced[DateLeft] ,WEEK)
or for a measure you got to wrap your fields in FIRSTDATE and LASTDATE
See if works.
N -
I see.
Something like this ?
IF(
ISBLANK(vw_PivotVisitsInvoiced[DateLeft],
Wks of Employment,
Wks of Employment 2
)
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
113 | |
99 | |
80 | |
70 | |
60 |
User | Count |
---|---|
149 | |
114 | |
107 | |
89 | |
67 |