Forum Discussion
arashaga
8 years agoHelper I
How to escape parenthesis in DAX filter function?
I am tryin to do the following
4 yr Graduation Rate = CALCULATE(sum(ipeds[Total men])+sum(ipeds[Total women],FILTER(ipeds,ipeds[Cohort data]="Bachelors or equiv subcohort (4-yr institution) Completers of bachelors or equiv degrees in 4 years or less")))
but it does not let me to have Parenthesis whithin a string "...(4 - yr institution...) part. How do I fix that?
- Anonymous8 years ago
This is because you are missing a ) in your second SUM(). If you add this and then remove the auto generated ) at the end of the query it will work.
4 yr Graduation Rate = CALCULATE ( SUM ( ipeds[Total men] ) + SUM ( ipeds[Total women] ), FILTER ( ipeds, ipeds[Cohort data] = "Bachelors or equiv subcohort (4-yr institution) Completers of bachelors or equiv degrees in 4 years or less" ) )
1 Reply
- AnonymousNot applicable
This is because you are missing a ) in your second SUM(). If you add this and then remove the auto generated ) at the end of the query it will work.
4 yr Graduation Rate = CALCULATE ( SUM ( ipeds[Total men] ) + SUM ( ipeds[Total women] ), FILTER ( ipeds, ipeds[Cohort data] = "Bachelors or equiv subcohort (4-yr institution) Completers of bachelors or equiv degrees in 4 years or less" ) )