March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
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 , 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,
How would the DAX look like if I want to create a new measure?
Total = SUMX(q2, q2[Antal lan lantagare under 18]+q2[Antal lan vuxna lantagare]+q2[Antal lán bibliotek]+q2[Antal lán TBK])
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:
change the table name to what you have.
Total = SUMX(q2, q2[Antal lån låntagare under 18]+q2[Antal lån vuxna låntagare]+q2[Antal lån bibliotek]+q2[Antal lån TBK])
I'm sorry but I don't get it 🙂 The error message points to "q2", should I replace this with something?
@Johan-MTM , q2 is name of the table in my pc, replace it with the name of table in your system.
Alright, here we go 🙂 All the tables but the first one (Bibliotek) are measures so this worked fine!
@Johan-MTM , This is because the measure once created are part of the model rather than that particular table. These measures can be acessed from anywhere without the name of table being attached to it, the names can be attached but it will work either way.
Thank You, if this solves the issue mark it as solution so that the community can fnd the solution easily.
Thank you! NOw I understand a bit more, but I do need to have seomthing there in order fpr it to work? If I remove the table name I get "Too few arguments..."
@Johan-MTM , I meant the name attached to measure, like 'table'[measure] and [measure] work the same way. The reason for "Too few argument" is that the function sumx require twoarguments, name of the table and the expression. The name of the table is not optional.
For more information on sumx refer to this link by microsoft:
hello @Johan-MTM either try using a matrix table or create a new measure that sums up all your measures and name it total
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
User | Count |
---|---|
90 | |
89 | |
85 | |
73 | |
49 |
User | Count |
---|---|
167 | |
149 | |
93 | |
72 | |
58 |