Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Dear all,
I have a measure that works fine, and returns me a count of rows for each blank date, as below.
The relationship between the two tables is the "employee ID", and the date is "dismissal date".
Count by Period =
CALCULATE(
COUNTROWS('TABLE_1');
FILTER(ALL('TABLE_2');
'TABLE_2'[Date] = BLANK()
)
)
I´m trying to access the values of it. I wanted something like this, but couldn´t figure out how to do it:
Values by Period =
CALCULATE(
VALUES('TABLE_1');
FILTER(ALL('TABLE_2');
'TABLE_2'[Date] = BLANK()
)
)
Thanks
Solved! Go to Solution.
After some work, I found a solution that worked for me. In case you have better ones, let me know.
Instead of working with a Measure, I actually added a calculated column with similar sintax:
Status per Period =
IF(
RELATED('TABLE_1'[Date of Dismissal].[Date]) < STARTOFMONTH('TABLE_2'[Period of earnings].[Date])
|| RELATED('TABLE_1'[Date of Dismissal].[Date]) > ENDOFMONTH('TABLE_2'[Period of earnings].[Date])
|| RELATED('TABLE_1'[Date of Dismissal].[Date]) = BLANK()
; "Active"
; "Dismissed"
)
After some work, I found a solution that worked for me. In case you have better ones, let me know.
Instead of working with a Measure, I actually added a calculated column with similar sintax:
Status per Period =
IF(
RELATED('TABLE_1'[Date of Dismissal].[Date]) < STARTOFMONTH('TABLE_2'[Period of earnings].[Date])
|| RELATED('TABLE_1'[Date of Dismissal].[Date]) > ENDOFMONTH('TABLE_2'[Period of earnings].[Date])
|| RELATED('TABLE_1'[Date of Dismissal].[Date]) = BLANK()
; "Active"
; "Dismissed"
)