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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
AlwaysBI
Frequent Visitor

pivot table with dynamic calculation

Hi

I am new to PowerBI, I have a table in below and would like to pivot it with a subtotal by type.  I have created a measure, If I want to pivot the table by SKU how can I archive the result I want? 

 

First Class Total =
VAR ClassData= SUMMARIZE(FILTER(NEWTable,NEWTable[Type] = "First Class"),NEWTable[Outlet],"Total",SUM(NEWTable[value]))
RETURN
SUMX(ClassData,[Total])

 

NEWTable

OutletTransaction_DateTypeProductvalue
LOLOMAYA21/3/2019First ClassSKU A1
LOLOMAYA21/3/2019First ClassSKU B1
LOLOMAYA21/3/2019First ClassSKU C0
LOLOMAYA21/3/2019Second ClassSKU D1
LOLOMAYA21/3/2019Second ClassSKU E1
LOLOMAYA21/3/2019Second ClassSKU F1
LULULALA21/3/2019First ClassSKU A0
LULULALA21/3/2019First ClassSKU B0
LULULALA21/3/2019First ClassSKU C1
LULULALA21/3/2019Second ClassSKU D0
LULULALA21/3/2019Second ClassSKU E0
LULULALA21/3/2019Second ClassSKU F0

 

Result

Transaction_DateOutletTotal First ClassSKU ASKU BSKU CTotal Second ClassSKU DSKU ESKU F
21/3/2019LOLOMAYA21103111
21/3/2019LULULALA10010000
0 REPLIES 0

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.