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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
Anonymous
Not applicable

Summarize function support

Hello, 

 

I am essentially trying to recreate the functionality of a pivot table with the below data set. What I want to be able to summarize is by calendar week the # of shipped and cancelled item quantities. Once I have this solved I can add a calculation for a cancellation rate. The data below is built via the summarize function of an existing table. 

 

msylv13_0-1650306236884.png

 

The final table should have the following headers: Order_Week, Order_Year, Shipped, Cancelled. With the final two being the sum of item quantities shipped or cancelled for an individual calendar week. The Order_Week column should not have duplicate values. 

 

Thank you in advance for any support!

3 REPLIES 3
amitchandak
Super User
Super User

@Anonymous , In power query you can pivot last 2

https://radacad.com/pivot-and-unpivot-with-power-bi

 

else have two measures and use iwth others in visual

shipped = calculate(sum(Table[Item Quantity]), filter(Table, Table[Order Status] ="SHIPPED") )

 

cancelled= calculate(sum(Table[Item Quantity]), filter(Table, Table[Order Status] ="CANCELLED") )

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not applicable

@amitchandak thank you for the response. 

 

I don't believe I can pivot the last 2 columns for this specific table as it is created via the SUMMARIZE function of a separate table. When I go to transform data I can only transform the original data source.

 

The functions you provided mostly work, however they need an additional filter for week #.

Anonymous
Not applicable

Hi @Anonymous ,

What does "they need an additional filter for week #mean? Does it mean need a filter for week#? If so, you can use the field week# to create a slicer or you can use the Filters pane to apply a visual level filter to visual. you can see the attachment for details.

yingyinr_0-1650524900646.png

If my understanding is not correct, please correct me and provide the correct function logic. Thank you.

Best Regards

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Fabric Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

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.