Forum Discussion

jags8386's avatar
jags8386
New Member
2 years ago

Create Cross table for multiple id and multiple category

I have following table structure. 

 

PersonCrime TypeWEEKID
P1ASSAULTWEEK-1
P1BURGERLYWEEK-3
P1ROBBERYWEEK-5
P1VANDALISMWEEK-3
P2BURGERLYWEEK-1
P2ROBBERYWEEK-2
P3THEFTWEEK-3
P3VANDALISMWEEK-3
P4ASSAULTWEEK-1
P4VANDALISMWEEK-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

 

 ASSAULTBURGERLYROBBERYTHEFTVANDALISM
ASSAULT211 2
BURGERLY121 1
ROBBERY112 1
THEFT   11
VANDALISM2  13

5 Replies

  • Syk's avatar
    Syk
    Resident Rockstar

    You can use a matrix visual for this. Put the crime type on rows and columns and a count of the ID for values.

  • I tried and I can only put crime type in either row or column

     

    • Syk's avatar
      Syk
      Resident Rockstar

      Hmm... Try making a calculated column that just equals the crime type column and put that in row and the original in column.