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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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