Forum Discussion
Filter a Calculated Measure using a Dax formula
I think that you would create a Measure that did a SUM of what you are trying to sum and then use a CALCULATE to calculate that measure in the context that you are trying to achieve.
Thanks for the response.... the challenge is the Calculate function only accepts a column, not a measure. Even if I create a measure that did a Sum.... the Calculate function will only take a column not a measure
- mattbrice9 years agoSolution Sage
Not sure i undestand what you are referring to. As Greg_Deckler said, just put your measure in where you highlighted in Black but don't wrap in a "SUM". The first parameter to CALCULATE is an expresssion which can be a measure as long as it returns a single value. Are you sure the errror is not becauser of the "SUM" you have in there? SUM does require a columna reference.
- JosephOutlaw9 years agoFrequent Visitor
Thanks for your reply ... Yes, you are correct, In this case though the return value is multiple values, not a single one
- mattbrice9 years agoSolution Sage
So you are trying to return more than one value from CALCULATE? You can't. But you can use CALCULATETABLE - but only inside another measure. At the end, a measure can only return a scalar value.
- Greg_Deckler9 years agoCommunity Champion
No, that simply is not correct. The first parameter in the CALCULATE function is an Expression and that can be a Measure. You can put a Measure in a CALCULATE as part of another Measure or a Calculated Column.