Forum Discussion
Create new table that sums rows based on matching column value
- 4 years ago
ddalton create this calculated table:
TableB = ADDCOLUMNS( VALUES('TableA'[Reference]), "Type1", CALCULATE(SUM('TableA'[Value]),'TableA'[Type] = "Type1"), "Type2", CALCULATE(SUM('TableA'[Value]),'TableA'[Type] = "Type2") )
In case it answered your question, please accept the solution to help other members find it. Appreciate Your Kudos.
SpartaBI Logo
Visit SpartaBI website Visit SpartaBI Linkdin Visit SpartaBI Facebook
Showcase Report – Contoso By SpartaBI
ddalton you mean like this? :
TableB =
ADDCOLUMNS(
ALL('TableA'[Reference], TableA[Cust]),
"Type1", CALCULATE(SUM('TableA'[Value]),'TableA'[Type] = "Type1"),
"Type2", CALCULATE(SUM('TableA'[Value]),'TableA'[Type] = "Type2")
)
In case it answered your question, please accept the solution to help other members find it. Appreciate Your Kudos.
SpartaBI Logo
Visit SpartaBI website Visit SpartaBI Linkdin Visit SpartaBI Facebook
Showcase Report – Contoso By SpartaBI
Exactly like that. Thank you!
- SpartaBI4 years ago
Community Champion
ddalton my pleasure 🙂
Don't forget about the report please 🤣.
https://community.powerbi.com/t5/Data-Stories-Gallery/SpartaBI-Feat-Contoso-100K/td-p/2449543
Give it a thumbs up over there if you liked it 🙂