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

Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!

Reply
webbj
Helper I
Helper I

Combining Multiple Rows /Transposing each category ID to its own column

Hello all, I believe what I am attempting to do is combine multiple rows from my table. The core of what I want to do is combine all duplicated ID rows into a single row and have a seperate column per category id. 

 

The Issue: As each category is on a seperate row it is creating multiple seperate entries for each ID which means I cannot filter on multiple categories. When trying the graphs go blank.

 

What I need to be able to do: create a graph/report that can be filtered against multiple criteria i.e. a chart showing sentiment over time filterable by location.

 

RAW data view

Here is how the data initially appears via the API - I have removed some columns so I can post here. categories.path is the main category grouping and then categories.name is the subcategory.

webbj_6-1692177168780.png

 

Journey so far

I have seperated the table into Results and Categories, and created a relationship between them using the results.category.id in Results and available.categories.id in Categories. 

webbj_2-1692175611712.png

webbj_3-1692175731194.png

 

I created a quick excel spreadsheet to import to see if each category was a column rather than a row I could apply multiple filters, this seemed to work.

webbj_4-1692176157927.png

 

What I am trying to do

Create seperate tables for each category

Merge those tables into the results table to create the seperate columns using the existing results.category.id and the id in the new table. 

Remove the existing results.category.id column

Merge each row with the same ID so I end up with something similar to the excel spreadsheet demo.

 

ID, Date, Comments, channel.id, sentiment.id, etc 

 

Is there a better way to go about this scenario? 

 

How can I combine / flatten each id into a single row whilst keeping the value's present in the newly added columns?

webbj_5-1692176894093.png

 

I hope this makes sense, if any more information is required please let me know. 

 

 

0 REPLIES 0

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

Vote for your favorite vizzies from the Power BI World Championship submissions!

Sticker Challenge 2026 Carousel

Join our Community Sticker Challenge 2026

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

January Power BI Update Carousel

Power BI Monthly Update - January 2026

Check out the January 2026 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.