This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. We're covering it all. You won't want to miss it.
Learn moreLevel up your Power BI skills this month - build one visual each week and tell better stories with data! Get started
Hi,
I'm trying to SUM a few variables, but I'm not sure how to write this in DAX.
Please take a look at my attached screenshots and you'll see what I am trying to do. The screenshot with the question mark is my attempt at it, but it doesn't work. Any pointers are appreciated, thank-you
this works
this does not work
Solved! Go to Solution.
With this sample table called 'fTable'
Try:
Sum A | C | D =
CALCULATE([Sum Value], FILTER(fTable, fTable[Category] IN {"A", "C", "D"}))
which delivers the same result as:
Sum A + C + D =
VAR _A = CALCULATE([Sum Value], FILTER(fTable, fTable[Category] = "A"))
VAR _C = CALCULATE([Sum Value], FILTER(fTable, fTable[Category] = "C"))
VAR _D = CALCULATE([Sum Value], FILTER(fTable, fTable[Category] = "D"))
RETURN
_A + _C + _D
Proud to be a Super User!
Paul on Linkedin.
thank-you. Your syntax worked. Here's how it looks now on my end:
DAX
Are you trying to filter the table where the value meets all 3 conditions (so AND) or if the value meets one of the conditions (so OR)?
Proud to be a Super User!
Paul on Linkedin.
yes, I want all 3 conditions (variables) included - AND. I want all 3 summed up. Each variable has a numerical value, so if it's 3 + 4 + 9, then I want to see 16 total in the frontend.
In my other BI tool (Qlik Sense), the following syntax is used (& it works):
Sum({<[Activity]={'33-McDonalds_UK-thankyou - Appli_Submision','McDon_IE_ATS_ThankYou_Pg'}>}[Total Conversions])
this also works:
Sum({<[Activity]={'Submitted_Application'}>}[Total Conversions])
+
Sum({<[Activity]={'UK_ATS_Submitted_Application'}>}[Total Conversions])
+
Sum({<[Activity]={'AU_ATS_Submitted_Application'}>}[Total Conversions])
but I can't find the correct way to write this in PowerBI DAX
With this sample table called 'fTable'
Try:
Sum A | C | D =
CALCULATE([Sum Value], FILTER(fTable, fTable[Category] IN {"A", "C", "D"}))
which delivers the same result as:
Sum A + C + D =
VAR _A = CALCULATE([Sum Value], FILTER(fTable, fTable[Category] = "A"))
VAR _C = CALCULATE([Sum Value], FILTER(fTable, fTable[Category] = "C"))
VAR _D = CALCULATE([Sum Value], FILTER(fTable, fTable[Category] = "D"))
RETURN
_A + _C + _D
Proud to be a Super User!
Paul on Linkedin.
Check out the April 2026 Power BI update to learn about new features.
Sign up to receive a private message when registration opens and key events begin.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
| User | Count |
|---|---|
| 39 | |
| 28 | |
| 27 | |
| 22 | |
| 18 |
| User | Count |
|---|---|
| 67 | |
| 37 | |
| 32 | |
| 26 | |
| 25 |