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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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