Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
arashaga
Helper I
Helper 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?

 

1 ACCEPTED SOLUTION
Anonymous
Not 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"
    )
)

View solution in original post

1 REPLY 1
Anonymous
Not 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"
    )
)

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.