Forum Discussion
Create summed table based on values from other rows
Hi guys,
I have the following "master" table:
Linked to a "slave" table:
(ID in Sub Table is independent from Master Table, while "Secondary ID" is assigned by Master Table as a relationship)
Some production lines have 2 sides, "a" and "b".
I would like to:
- create a calculated table where:
- Line X's weight, from both sides a and b, appear as one "summarized" averaged value.
- Example 1: For SECONDARY ID #1 above: Line 2a and 2b the "summarized averaged" value for Weight = 0.26 (since 0.26+0.26/2 = 0.26).
- Example 2: Line 3a and 3b "summarized average value" would be = 2.8205 (since 2.808 + 2.833 = 2.8205)
- Etc.
- Line X's weight, from both sides a and b, appear as one "summarized" averaged value.
- This summarized table would show me also the single production lines (lines with no side a or b, like line 4 above).
Any help is highly appreciated!
7 Replies
- lbendlinSuper User
Please provide the sample data that in usable format (not as a screenshot).
https://community.powerbi.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-p/963216- AnonymousNot applicable
Hi sorry about that, please see link below:
- lbendlinSuper User
Not sure why you would need a calculated table for that. The data model can do the work for you.
see attached
- AnonymousNot applicable
Need a calculated table because I need to use that averaged value for other calculations. For example, I will use that averaged value to multiply times other columns to get percentages, total material consumed, etc.
- lbendlinSuper User
Table = SUMMARIZECOLUMNS('Main Table'[ID], 'Sub Table 1'[Line], "AverageWeight__lbs_ft_", CALCULATE(AVERAGE('Sub Table 1'[Weight (lbs/ft)])) )