Forum Discussion
Group and Sum Row by Row
- Anonymous7 years ago
give this a try:
Table = ADDCOLUMNS( SUMMARIZECOLUMNS(Table1[Key]), "Total Qty", CALCULATE( SUM( Table1[Quantity])), "Total Sales Price", CALCULATE( SUM( Table1[Sales Price])) )
Hi Nick,
Thank you so much for your suggestion.
When i tried your suggestions i am getting below error,
"The expression refers to multiple columns. Multiple columns cannot be converted to a scalar value.".
Thanks
Anonymous wrote:give this a try:
Table = ADDCOLUMNS( SUMMARIZECOLUMNS(Table1[Key]), "Total Qty", CALCULATE( SUM( Table1[Quantity])), "Total Sales Price", CALCULATE( SUM( Table1[Sales Price])) )
Are you creating this as a new table, or as a new measure? This should be a new table
- Anonymous7 years agoNot applicable
Hi,
i do not want new table i want two new columns.
Thanks
Cmcmahan wrote:Are you creating this as a new table, or as a new measure? This should be a new table
- Anonymous7 years agoNot applicable
Hi
Cmcmahan suggestion is correct. You need to have a new table, not additional columns. The expected result you showed us is a summarized table, with a different grain (one row per each key).
- Anonymous7 years agoNot applicable
Thanks for your suggestion.
You both are right and it is giving me the right numbers.
Thanks Again.