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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request 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
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors