Forum Discussion
Anonymous
3 years agoNot applicable
DAX syntax
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...
- 3 years ago
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
Anonymous
3 years agoNot applicable
thank-you. Your syntax worked. Here's how it looks now on my end:
DAX