cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
newuser1
Frequent Visitor

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

@newuser1  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!






New Animated Dashboard: Sales Calendar


View solution in original post

3 REPLIES 3
smpa01
Super User
Super User

@newuser1  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!






New Animated Dashboard: Sales Calendar


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.

@newuser1  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!






New Animated Dashboard: Sales Calendar


Helpful resources

Announcements
Exciting changes

Power BI Community Changes

Check out the changes to the Power BI Community announced at Build.

May 2023 update

Power BI May 2023 Update

Find out more about the May 2023 update.

Top Solution Authors