Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
sperry
Resolver I
Resolver I

Count Instances of events where the count of another event is >0

I have a dataset of events representing referrals to our services.

 

I need a measure to count of all instances  where an individual is accepted into more than 1 service over a period of time. The simplified data looks a bit like this

 

DateServiceStatusUnique Identifier
1/01/2019AAccept1
2/01/2019BAccept1
3/01/2019CDecline1
4/01/2019DAccept2
5/01/2019ADecline2
6/01/2019BDecline2
7/01/2019EAccept1
8/01/2019AAccept3
9/01/2019BAccept3

 

So there are 2 people who have been accepted into more than 1 service

1 ACCEPTED SOLUTION
Zubair_Muhammad
Community Champion
Community Champion

@sperry 

 

You can use this MEASURE

 

Measure =
COUNTROWS (
    FILTER (
        VALUES ( Table1[Unique Identifier] ),
        CALCULATE ( DISTINCTCOUNT ( Table1[Service] ), Table1[Status] = "Accept" ) > 1
    )
)

Regards
Zubair

Please try my custom visuals

View solution in original post

2 REPLIES 2
Zubair_Muhammad
Community Champion
Community Champion

@sperry 

 

You can use this MEASURE

 

Measure =
COUNTROWS (
    FILTER (
        VALUES ( Table1[Unique Identifier] ),
        CALCULATE ( DISTINCTCOUNT ( Table1[Service] ), Table1[Status] = "Accept" ) > 1
    )
)

Regards
Zubair

Please try my custom visuals

Perfect..Thanks

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel

Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.