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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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