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

We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now

Reply
pudel
Regular Visitor

Restructure table: create row entries based on column value

I'm trying to create a revenue reporting for multiple stores.

The source data is queried from a web-api for each store seperately and structured like:

DateInvoice#CustomerPayMethodTotalserviceCat1serviceCat2prodCat1prodCat2
01.01.20221Acash1000200 800 
01.01.20222Bcc25   25
02.01.20223Cpaypall333.5  233.5100
02.01.20224Dcash666 666  

How can I bring that into a form that I have the product/service categories in a "category" and the corresponding value in a "amount" column -> creating additional rows if multiple categories are used for one original entry like:

DateInvoice#CustomerPayMethodCategoryAmount
01.01.20221AcashserviceCat1200
01.01.20221AcashprodCat1800
01.01.20222BccprodCat225
02.01.20223CpaypallprodCat1233.5
02.01.20223CpaypallprodCat2100
02.01.20224DcashserviceCat2666

...so I can create a report that is filterable by "category".

Some shops have 20+ "categories", so filtering each column by !=NULL and then appending the 20+ resolving seperate tables isn't really an option given the >10 shops...

 

Any help/hints is highly apprechiated!

1 ACCEPTED SOLUTION
HotChilli
Community Champion
Community Champion

Select the columns from Date to Total.  Right-click the header and choose Unpivot Other Columns.

I think that'll work.  Let me know how you get on.

View solution in original post

2 REPLIES 2
v-jingzhang
Community Support
Community Support

Hi @pudel 

 

Have you tried @HotChilli 's method? That should work. Feel free to let us know if you have any questions. 

 

Here are documents for your reference.

Unpivot columns | Microsoft Docs

Pivot and Unpivot with Power BI - RADACAD

 

Best Regards,
Community Support Team _ Jing

HotChilli
Community Champion
Community Champion

Select the columns from Date to Total.  Right-click the header and choose Unpivot Other Columns.

I think that'll work.  Let me know how you get on.

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.