Forum Discussion
Add a column for row totals
Hi,
How do I add a column that show a total for each row?
Total = SUMX(q2, q2[Antal lan lantagare under 18]+q2[Antal lan vuxna lantagare]+q2[Antal lán bibliotek]+q2[Antal lán TBK])
12 Replies
- Johan-MTM
Helper III
How would the DAX look like if I want to create a new measure?
- ChiragGarg2512
Solution Sage
Total = SUMX(q2, q2[Antal lan lantagare under 18]+q2[Antal lan vuxna lantagare]+q2[Antal lán bibliotek]+q2[Antal lán TBK])
- Johan-MTM
Helper III
Sorry ChiragGarg2512 , I didn't see your reply before I posted my question!
I tried a new measure with your sugestion but got an error:
- ChiragGarg2512
Solution Sage
Johan-MTM , If the simple objective is to have a column that is the sum data in each row. For ex, the new column value for "Angereds bibliotek" is 34, then
Total = q2[Antal lan lantagare under 18]+q2[Antal lan vuxna lantagare]+q2[Antal lán bibliotek]+q2[Antal lán TBK]
should work.
If a measure is required,
Total = SUMX(q2, q2[Antal lan lantagare under 18]+q2[Antal lan vuxna lantagare]+q2[Antal lán bibliotek]+q2[Antal lán TBK])should do the trick.