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
KamelKlutch
New Member

Create a new table from sum columns from existing tables

I have a table of data where normally the value of one of the fields would be field itself. I want to create a new table from the raw data table. 

 

The table of data:

 

ProgramColorDateTypeEntryTypeQTY
Part ABlack6/14/2019LHInspected20
Part ABlack6/14/2019LHAssembled17
Part ABlack6/14/2019LHDefect A3
Part ABlack6/14/2019LHDefect B1
Part ABlack6/14/2019LHDefect E1
Part ABlack6/14/2019LHDefect F1
Part ABlack6/14/2019RHInspected40
Part ABlack6/14/2019RHAssembled31
Part ABlack6/14/2019RHDefect A0
Part ABlack6/14/2019RHDefect B9
Part ABlack6/14/2019RHDefect C4
Part ABlack6/14/2019RHDefect D2
Part ABlack6/14/2019RHDefect G2
Part ABlack6/14/2019RHDefect H1
Part BBlack6/14/2019LHInspected100
Part BBlack6/14/2019LHAssembled10
Part BBlack6/14/2019LHDefect A3
Part BBlack6/14/2019LHDefect B1
Part BBlack6/14/2019LHDefect C1
Part BBlack6/14/2019LHDefect D1
Part BBlack6/14/2019RHInspected1000
Part BBlack6/14/2019RHAssembled200
Part BBlack6/14/2019RHDefect A0
Part BBlack6/14/2019RHDefect B9
Part BBlack6/14/2019RHDefect C4
Part BBlack6/14/2019RHDefect D2
Part BBlack6/14/2019RHDefect I2
Part BBlack6/14/2019RHDefect J1

 

I would like to create a new table that would show (by date) the total of assembled and total of inspected for each Program/Type combination. 

Something like this:

ProgramColorDateTypeInspectedAssembled
Part ABlack6/14/2019LH2017
Part ABlack6/14/2019RH4031
Part BBlack6/14/2019LH10010
Part BBlack6/14/2019RH1000200
1 ACCEPTED SOLUTION
jdbuchanan71
Super User
Super User

Hello @KamelKlutch , give this a try.

Summary Table = 
SUMMARIZE (
    'Base Table',
    'Base Table'[Program],
    'Base Table'[Color],
    'Base Table'[Date],
    'Base Table'[Type],
    "Inspected", CALCULATE ( SUM ( 'Base Table'[QTY] ), 'Base Table'[EntryType] = "Inspected" ),
    "Assembled", CALCULATE ( SUM ( 'Base Table'[QTY] ), 'Base Table'[EntryType] = "Assembled" )
)

 summarytable.jpg

View solution in original post

1 REPLY 1
jdbuchanan71
Super User
Super User

Hello @KamelKlutch , give this a try.

Summary Table = 
SUMMARIZE (
    'Base Table',
    'Base Table'[Program],
    'Base Table'[Color],
    'Base Table'[Date],
    'Base Table'[Type],
    "Inspected", CALCULATE ( SUM ( 'Base Table'[QTY] ), 'Base Table'[EntryType] = "Inspected" ),
    "Assembled", CALCULATE ( SUM ( 'Base Table'[QTY] ), 'Base Table'[EntryType] = "Assembled" )
)

 summarytable.jpg

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.