Forum Discussion
Filter a Calculated Measure using a Dax formula
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
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.
- JosephOutlaw8 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
- mattbrice8 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.
- JosephOutlaw8 years agoFrequent Visitor
Ok, thats what I thought. I was also looking at using a variable. Are we able to use a Variable with the Calculate function?
Similar to what I have below or will this too only accept a scalar value? Thanks for your help.
Var XXX = (ReturnValue,Multilple records)
Return
CALCULATE( XXX),FPA_PARENT_USAGE_REVENUE[Exclude] = BLANK(),FPA_USAGE_REVENUE[LE_Version] = "2.0")