Forum Discussion
astroadmin
6 years agoNew Member
DAX - Calculate with Filter using table column value
Hi Everyone, I am trying to make a DAX function work. For some reason, searching for hours couldnt find a solution. Any help will be greatly appriciated. Result = CALCULATE( SUM(DATA[E...
- 6 years ago
If this is a column, you should be able to use:
Result = CALCULATE( SUM(DATA[Estimated Annual Revenue]), FILTER ( ALL ( DATA[BusinessUnit] ), DATA[BusinessUnit] = EARLIER([BU]) ) )If it is a measure, you could use:
Result = VAR __BU = MAX('DATA'[BU]) RETURN CALCULATE( SUM(DATA[Estimated Annual Revenue]), FILTER ( ALL ( DATA[BusinessUnit] ), DATA[BusinessUnit] = __BU ) )
amitchandak
6 years agoSuper User
The first one is suggested as column not Measure
astroadmin
6 years agoNew Member
Hi amitchandak and Greg_Deckler ,
I see what you mean, yes the newly added field was a measure, thats why it was not working. When I changed new measure to new column, things started to work!
Thanks a lot.