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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

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

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.