Hi,
There is a workflow where there are 3 game types (Game Type 1, Game Type 2, Game Type 3) and 3 ranges of frequency (0-5, 6-10, 11-15)
When I input the data, do data processing and the final result is something like below:
Frequency | Game Type 1 | Game Type 3 |
0-5 | 3 | [NULL] |
6-10 | [NULL] | 9 |
Now, I want above output to look as:
Frequency | Game Type 1 | Game Type 2 | Game Type 3 |
0-5 | 3 | [NULL] | [NULL] |
6-10 | [NULL] | [NULL] | 9 |
11-15 | [NULL] | [NULL] | [NULL] |
Basically, no matter what output I get, I want to fill that in a base template:
Frequency | Game Type 1 | Game Type 2 | Game Type 3 |
0-5 | |||
6-10 | |||
11-15 |
How can I do this? May be I can put the template as a Text Input and then do matching in some way?
Thanks in advance.
Deevi
Solved! Go to Solution.
Hi @Deevi
You're correct in thinking that the template needs to be defined outside of the input data, but you define the rows and columns independently.
The Game Types and Frequencies text input tools define the rows and columns. You then append these to generate all possible combinations. You then join this with your input data, and union the J and R to get the matched and unmatched rows. Crosstab to get the 3x3 structure that you need. I put in the added step of of the rename because the Crosstab will replace all spaces wiht underscores in the column names.
I wasn't sure how you get the input data but since you show a crosstabbed table, it's probably something equivalent to the mockup data that I created. If your Input is the table that you show, then transpose it and use the result as the input to the join.
Here are the results
Dan
User | Count |
---|---|
19 | |
15 | |
15 | |
8 | |
6 |