Forum Discussion
Summarize values from multiple columns over multiple categories
Hi,
I am struggeling to perform a calculation which gives me the total sum of quantities across all methologies 1/2/3. So far, I can only compute seperate sums, but not a combined total.
This may be very basic, however I'd really appreciate your feedback 🙂
Thanks,
Ann
AL01 Create a new calculated column for each methodology that sums the quantities from all methodologies for each row:
DAX
Kido Total =
IF('Table'[Methodology 1] = "Kido", 'Table'[Quantity 1], 0) +
IF('Table'[Methodology 2] = "Kido", 'Table'[Quantity 2], 0) +
IF('Table'[Methodology 3] = "Kido", 'Table'[Quantity 3], 0)Create a measure that sums the Kido Total column across all rows:
Total Kido Quantity = SUM('Table'[Kido Total])
Do similarly for other categories
5 Replies
- DekuSuper User
If you want the sum per CUS#
Quantities = SUM( tbl[quantity 1] ) + sum( tbl[quantity 2] ) + sum( tbl[quantity 3])
- bhanu_gautamSuper User
AL01 You can create a new calculated column that sums the quantities from all methodologies for each row.
DAX
Total Quantity =
'Table'[Quantity 1] + 'Table'[Quantity 2] + 'Table'[Quantity 3]You can create a measure that sums the Total Quantity column across all rows.
Total Sum of Quantities =
SUM('Table'[Total Quantity])You can then use this measure in your Power BI report to display the total sum of quantities across all methodologies.
- AL01New Member
Thanks for your thoughts.
I would like to have the sum of the methodology, e.g. Kido Qty 7 from Method 1 and Qty 18 from Method 2 = 25. The CUS# doesn't matter, but the report is build based on the customer info.
- bhanu_gautamSuper User
AL01 Create a new calculated column for each methodology that sums the quantities from all methodologies for each row:
DAX
Kido Total =
IF('Table'[Methodology 1] = "Kido", 'Table'[Quantity 1], 0) +
IF('Table'[Methodology 2] = "Kido", 'Table'[Quantity 2], 0) +
IF('Table'[Methodology 3] = "Kido", 'Table'[Quantity 3], 0)Create a measure that sums the Kido Total column across all rows:
Total Kido Quantity = SUM('Table'[Kido Total])
Do similarly for other categories
- AL01New Member
That is what I was looking for.. couldn't get my head around it 🙂 Thanks!