Forum Discussion
Measure as Calculate filter expression
Hi,
I am trying to use a measure that returns Text as a filter for Calculate function, however I am getting an error
Following are the measures:
Returning 2018 = IF([YTD 2017]>0 && [YTD 2018] >0,"Returning2018")
I want to use Returning 2018 measure as a filter in DAX CALCULATE function
Returning Sales 2018 = CALCULATE(SUM('Sales'[Net Sales]), "Calender'[Year] = "2018", [Returning 2018] = "Returning2018"))
Is it possible to use a measure returning text to use inside Calculate function
Please help, Thanks!
Anonymous I should have asked how these measures are written and how does data model looks like, use FILTER function and put this measure condition in that filter function.
3 Replies
- parry2kSuper User
Anonymous store measure value in a variable and then filter it. Try this
Returning Sales 2018 = VAR __val = [Returning 2018] RETURN CALCULATE( SUM('Sales'[Net Sales]), "Calender'[Year] = "2018", __val = "Returning2018" )- AnonymousNot applicable
parry2k Thanks for the reply, however I am getting the following error :
The True/False expression does not specify a column. Each True/False expressions used as a table filter expression must refer to exactly one column.
- parry2kSuper User
Anonymous I should have asked how these measures are written and how does data model looks like, use FILTER function and put this measure condition in that filter function.