Forum Discussion

arashaga's avatar
arashaga
Helper I
8 years ago
Solved

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) C...
  • Anonymous's avatar
    Anonymous
    8 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"
        )
    )