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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

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
July 2024 Power BI Update

Power BI Monthly Update - July 2024

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

PBI_Carousel_NL_June

Fabric Community Update - June 2024

Get the latest Fabric updates from Build 2024, key Skills Challenge voucher deadlines, top blogs, forum posts, and product ideas.

Top Solution Authors