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

The Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.

Reply
Anonymous
Not applicable

Count of unique occurrences with multiple criteria/exceptions

I need help finding the count of unique encounters for data similar to the example below. A unique encounter = unique ID at a unique location receiving a unique service on a unique date by a unique provider. I need to be able to filter and run unique encounter counts based on those variables, i.e. unique encounters at location VA vs CA, for service a vs b vs c, on [date], and by provider x vs y.

Thanks so much for any guidance!

 

IDLOCATIONSERVICESERVICE DATEPROVIDER
1VAa12/1/2021x
1VAa12/1/2021x
1VAa12/1/2021y
1VAb12/1/2021x
1VAa12/2/2021x
1VAb12/2/2021y
1VAc12/1/2021x
1VAc12/3/2021x
1VAc12/2/2021y
2CAa12/1/2021x
2CAa12/1/2001y
2CAc12/1/2021x
2CAc12/1/2021x
2CAb12/2/2021x
2CAb12/2/2021y
2CAa12/2/2021x
2CAb12/2/2021x
1 ACCEPTED SOLUTION

@Anonymous  so this works for you I guess

Measure3 = 
COUNTROWS (
    SUMMARIZE (
        'Table',
        'Table'[ID],
        'Table'[LOCATION],
        'Table'[PROVIDER],
        'Table'[SERVICE DATE],
        'Table'[SERVICE]
    )
)

 

smpa01_0-1638906570892.png

 

Did I answer your question? Mark my post as a solution!
Proud to be a Super User!
My custom visualization projects
Plotting Live Sound: Viz1
Beautiful News:Viz1, Viz2, Viz3
Visual Capitalist: Working Hrs

View solution in original post

3 REPLIES 3
smpa01
Super User
Super User

@Anonymous  did you mean this

 

smpa01_0-1638904964273.png

 

Did I answer your question? Mark my post as a solution!
Proud to be a Super User!
My custom visualization projects
Plotting Live Sound: Viz1
Beautiful News:Viz1, Viz2, Viz3
Visual Capitalist: Working Hrs
Anonymous
Not applicable

I beleive that just counts the rows without any filters to identify unique encounters. For example, the first two rows should only count as 1 encounter because it's the same ID, at the same location, receiving the same service, on the same service date, by the same provider. The third row, however, is by a different provider to that should count as another unique encounter.

@Anonymous  so this works for you I guess

Measure3 = 
COUNTROWS (
    SUMMARIZE (
        'Table',
        'Table'[ID],
        'Table'[LOCATION],
        'Table'[PROVIDER],
        'Table'[SERVICE DATE],
        'Table'[SERVICE]
    )
)

 

smpa01_0-1638906570892.png

 

Did I answer your question? Mark my post as a solution!
Proud to be a Super User!
My custom visualization projects
Plotting Live Sound: Viz1
Beautiful News:Viz1, Viz2, Viz3
Visual Capitalist: Working Hrs

Helpful resources

Announcements
Feb2025 Sticker Challenge

Join our Community Sticker Challenge 2025

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

Jan NL Carousel

Fabric Community Update - January 2025

Find out what's new and trending in the Fabric community.