Hi,
I was wondering whether there was a Count Distinct Function? I know the summarise tool has it but I need to filter my data each time and then join it back to the main dataset which is making it very messy. Details below:
Data Input:
Project | Red | Yellow | Blue | Green | Orange |
1 | Y | Y | N | Y | Y |
2 | N | N | N | N | Y |
3 | Y | N | Y | Y | Y |
4 | Y | Y | Y | N | Y |
5 | Y | N | N | Y | Y |
Desired Output:
Project | Red | Yellow | Blue | Green | Orange | Count No. projects where Red = Y | Yellow = Y | Blue = Y | Green = Y | Orange = Y |
1 | Y | Y | N | Y | Y | 4 | 2 | 2 | 3 | 5 |
2 | N | N | N | N | Y | 4 | 2 | 2 | 3 | 5 |
3 | Y | N | Y | Y | Y | 4 | 2 | 2 | 3 | 5 |
4 | Y | Y | Y | N | Y | 4 | 2 | 2 | 3 | 5 |
5 | Y | N | N | Y | Y | 4 | 2 | 2 | 3 | 5 |
Thanks!
Solved! Go to Solution.
You can use Transpose and CrossTab to make this a simpler operation.
Transpose to convert the Input to Project, Colour, Value.
You can then do the summarise to produce totals for each colour = Y
Then crosstab back to produce a single row
Finally append fields to original set.
Have attached a demo workflow
Thank you all for your help!
User | Count |
---|---|
19 | |
15 | |
13 | |
9 | |
8 |