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
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
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.