Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago
Solved

distnict count based on multiple column

I would like to check repeated values in my table based on Day and location column. Here is my Sample data:

VisitorIDDayLocation
15011Location 1
15011Location 2
15011Location 3
11591Location 1
11522Location 1
18803Location 4
14101Location 1
16101Location 1
16101Location 2
15012Location 1
15013Location 1
16321Location 1
16321Location 2
16321Location 3
16322Location 4
16323Location 4
16324Location 1

 

And I am looking for output like:

Repeat DaysDistinct Count of VisitorID
1 Day Only (Not Repeated)4
2 Day Repeat4
3 Day Repeat2
4 Day Repeat1

 

In Single day (any day) Location is not repeating but event day is repeating since a visitor can go in to different location in a day. Can we create a mesure that will calculate Distinct Count of VisitorID based on these 2 columns,

I have multiple columns in my table. 

Thanks, Kul