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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
vrossouw
Helper III
Helper III

Add to a "Summarize" Table

Hi, I have created a new table with the "Summarize" function. 

 

New Table = SUMMARIZE(Sales,Sales[Part Number],"Total Sales per Item",
CALCULATE(Sales[Sales Value]))
 
How can I also bring in the Year column from the Sales Table?  Seems as if the summarize function only accept measures. The year column is in a text type format.
 
There is a relationship between the New Table and Sales Table.  If I attempt to add the year to the New Table, link column, which is 'part number', change to multiple rows in the New Table.
 
Then the relationship change to 'many to many' and the data no longer makes sense.  I want to filter on the year, and both visuals, from both tables, must be interactive.
 
 Sales Table
Part NumberSales ValueYear
A90555A5453262019
A90555A4373812020
A90555A5682922021
C90558A5560032019
C90558A4983432020
C90558A3012232021
E90557A8316832019
E90557A8399772020
E90557A4755632021
 
 
New Table  (How do I bring the year into this table). Related function does not seem to work.
Part NumberTotal Sales per Item
A90555A1550999
C90558A1355569
E90557A2147223
 
 
 Thanks in advance
 
1 ACCEPTED SOLUTION
v-alq-msft
Community Support
Community Support

Hi, @vrossouw 

Based on your description, it is available to create a calculated table as follows.

New = SUMMARIZE(

    Sales,

    Sales[Part Number],

    Sales[Year],

    "Total Sales per Item",

    CALCULATE(SUM(Sales[Sales Value])

))

 

d1.png

While the result of summarize function is the same as the sales table. If you want to repeat a table, you can click ‘Edit Query’, go to Query Editor, right-click the sales query and choose ‘Duplicate’ to get a same table.
dd2.png
 

If you want to filter on the year, you can use ‘Part Number’, ‘Sales Value’ in a table visual and use ‘Year’ as the slicer to filter it.

dd.png

 

If I misunderstand your thought, please show me your expected output. I am glad to solve the problem for you.

 

Best Regards,

Allan

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
v-alq-msft
Community Support
Community Support

Hi, @vrossouw 

Based on your description, it is available to create a calculated table as follows.

New = SUMMARIZE(

    Sales,

    Sales[Part Number],

    Sales[Year],

    "Total Sales per Item",

    CALCULATE(SUM(Sales[Sales Value])

))

 

d1.png

While the result of summarize function is the same as the sales table. If you want to repeat a table, you can click ‘Edit Query’, go to Query Editor, right-click the sales query and choose ‘Duplicate’ to get a same table.
dd2.png
 

If you want to filter on the year, you can use ‘Part Number’, ‘Sales Value’ in a table visual and use ‘Year’ as the slicer to filter it.

dd.png

 

If I misunderstand your thought, please show me your expected output. I am glad to solve the problem for you.

 

Best Regards,

Allan

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi @vrossouw,

 

 

New Table = SUMMARIZE(Sales,Sales[Part Number],Sales[Year],"Total Sales per Item and Year",
CALCULATE(Sales[Sales Value]))

 

 

does it make sense what you want to do?

Why is there a relationship between the New Table and Sales Table?

 

 

If I answered your question, please mark my post as solution, this will also help others.

Please give Kudos for support.

Did I answer your question?
Please mark my post as solution, this will also help others.
Please give Kudos for support.

Marcus Wegener works as Full Stack Power BI Engineer at BI or DIE.
His mission is clear: "Get the most out of data, with Power BI."
twitter - LinkedIn - YouTube - website - podcast


Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

Power BI Carousel June 2024

Power BI Monthly Update - June 2024

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

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.