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!
Power BI release plans for 2023 release wave 1 describes all new features releasing from April 2023 through September 2023.
Make sure you register today for the Power BI Summit 2023. Don't miss all of the great sessions and speakers!
User | Count |
---|---|
216 | |
55 | |
47 | |
44 | |
43 |
User | Count |
---|---|
294 | |
208 | |
75 | |
74 | |
66 |