Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
phoenix
Creator
Creator

Create frequency count crosstab matrix and for each combination calculate percentages of target var

Hello experts,
I have the following dataset
ID   attribute1   attribute2   attribute3     BAD (Y-> yes)
1        1               0               0                 Y
2        1               1               0                 N
3        1               0               1                 Y
4        0               1               1                 N
5        1               1               0                 Y
6        1               1               0                 N
7        1               0               1                 Y
8        1               0               1                 N
I want to create frequency count matrix, for each combination of attribute tripped (atrribute = 1 means tripped) like following:
                          attribute1    attribute2    attribute3
attribute1                  _                3                  3
attribute2                 3                 _                 1
attribute3                 3                 1                  _
It represents counts of attributes tripped together.
Once i have the counts I need to calcualte %BAD in each combination like below.

                      attribute1     attribute2     attribute3
attribute1             _               12.50%         25%
attribute2        12.50%             _                   0%
attribute3            25%              0%                _
it represents out of 3 ID's for the combination atribute1 and atribute2 tripped, one ID went BAD -> so 12.5% BAD
And out of 3 ID's for the combination attribute1 and attribute1 tripped, two went BAD -> so 25% BAD
And the 1 ID for the combination attribute2 and attribute3 tripped, didnt went BAD -> so 0% BAD
Could anyone please let me know if this could done in Qlikview?
Thanks
1 Solution

Accepted Solutions
Nicole-Smith

Please do not post the same question more than once.  The original thread is here: Create frequency count crosstab matrix and for each combination calculate percentages of target var

View solution in original post

2 Replies
Nicole-Smith

Please do not post the same question more than once.  The original thread is here: Create frequency count crosstab matrix and for each combination calculate percentages of target var

phoenix
Creator
Creator
Author

Ok. I was not sure if I posted it in the right group. I shall close this.

Thanks