We're giving away 30 tickets for FREE! Share your story, your vision, or your hustle and tell us why YOU deserve a ticket.
Apply nowWin a FREE 3 Day Ticket to FabCon Vienna. Apply now
I have following table structure.
Person | Crime Type | WEEKID |
P1 | ASSAULT | WEEK-1 |
P1 | BURGERLY | WEEK-3 |
P1 | ROBBERY | WEEK-5 |
P1 | VANDALISM | WEEK-3 |
P2 | BURGERLY | WEEK-1 |
P2 | ROBBERY | WEEK-2 |
P3 | THEFT | WEEK-3 |
P3 | VANDALISM | WEEK-3 |
P4 | ASSAULT | WEEK-1 |
P4 | VANDALISM | WEEK-1 |
I want to create cross tab where following structure ocmes. I want to identify how many person has done assult are involved in other crime and vice versa
ASSAULT | BURGERLY | ROBBERY | THEFT | VANDALISM | |
ASSAULT | 2 | 1 | 1 | 2 | |
BURGERLY | 1 | 2 | 1 | 1 | |
ROBBERY | 1 | 1 | 2 | 1 | |
THEFT | 1 | 1 | |||
VANDALISM | 2 | 1 | 3 |
I tried and I can only put crime type in either row or column
Hmm... Try making a calculated column that just equals the crime type column and put that in row and the original in column.
Can you explain more to this?
I have tried
It just gives me
ASSAULT | BURGERLY | ROBBERY | THEFT | VANDALISM | |
ASSAULT | 2 | ||||
BURGERLY | 2 | ||||
ROBBERY | 2 | ||||
THEFT | 1 | ||||
VANDALISM | 3 |
You can use a matrix visual for this. Put the crime type on rows and columns and a count of the ID for values.
User | Count |
---|---|
62 | |
59 | |
46 | |
35 | |
31 |
User | Count |
---|---|
85 | |
71 | |
57 | |
51 | |
46 |