Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Win a FREE 3 Day Ticket to FabCon Vienna. Apply now

Reply
jags8386
New Member

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 5
jags8386
New Member

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 

 

 ASSAULTBURGERLYROBBERYTHEFTVANDALISM
ASSAULT2    
BURGERLY 2   
ROBBERY  2  
THEFT   1 
VANDALISM    3
Syk
Super User
Super User

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

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.