Solved! Go to Solution.
Hi,
I am not sure how your datamodel looks like, but please try disconnect the relationship between date table and fact table. And then try the below measure.
Distinct count of active employees =
VAR _active =
SUMMARIZE (
FILTER (
FactEmployement,
(
'FactEmployement'[Ansatt fra] <= MAX ( 'DimDates'[Dates] )
&& OR (
( FactEmployement[Ansatt til] >= MIN ( 'DimDates'[Dates] ) ),
ISBLANK ( FactEmployement[Ansatt til] )
)
)
),
FactEmployement[Ansattnr]
)
VAR result =
COUNTROWS ( _active )
RETURN
result
If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.
Hi,
Share some data and show the expected result.
Hi,
I am not sure how your datamodel looks like, but please try disconnect the relationship between date table and fact table. And then try the below measure.
Distinct count of active employees =
VAR _active =
SUMMARIZE (
FILTER (
FactEmployement,
(
'FactEmployement'[Ansatt fra] <= MAX ( 'DimDates'[Dates] )
&& OR (
( FactEmployement[Ansatt til] >= MIN ( 'DimDates'[Dates] ) ),
ISBLANK ( FactEmployement[Ansatt til] )
)
)
),
FactEmployement[Ansattnr]
)
VAR result =
COUNTROWS ( _active )
RETURN
result
If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.
Thank you so much! This is exactly what I was looking for!
User | Count |
---|---|
105 | |
88 | |
69 | |
52 | |
49 |
User | Count |
---|---|
148 | |
94 | |
79 | |
71 | |
70 |