I'm trying to get Excel to determine the number of unique days in a week, based on an Identifier.
I'm pulling in data from SQL and pasting it into a sheet. Here's an example
10045 0 0 0 0 0 1 1
10045 1 1 0 1 1 0 0
10046 0 0 0 1 0 0 0
10046 1 0 0 0 0 0 0
10047 0 0 0 1 1 0 0
10047 1 1 0 0 1 0 0
10049 1 1 0 1 1 1 0
10050 0 0 0 0 0 1 1
10050 1 0 0 0 0 0 0
10050 1 1 0 1 1 0 0
10051 1 0 0 0 0 0 0
10051 0 0 0 0 1 0 0
10051 0 1 0 1 0 0 0
The first column is the ID, the remaining columns are the days of the week Mon-Sun. Each day is selected if the flag is set to true.
So ID 10045 will have 6 unique days. A better example is ID 10050, which also has 6 unique days, since Wednesday is not set to true on any of the rows.
I want to add another column which determines the number of unique days for each identifier. I've done some searching for the solution to this, but have been unable to find it.
If there's any additional information you might need let me know.
Thank you
Bookmarks