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

The Power BI Data Visualization World Championships is back! It's time to submit your entry. Live now!

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
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! It's time to submit your entry.

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.