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

Try your skills in the Power BI Dataviz World Championship! Round one ends June 26. Join now

Reply
ce138867
Resolver II
Resolver II

Syntax error when using calculate function with multiple filters

I am trying to create a measure with the following formula

 

Measure1= CALCULATE(
    DISTINCTCOUNT('Baseline'[FIN]),FILTER('Baseline',[Episode Trigger Status]= "Post-Trigger"}
&& 'Baseline',Baseline[Encounter Type] = "IP"))
 
The error displayed is: The syntax for '}' is incorrect. (DAX(CALCULATE( DISTINCTCOUNT('Baseline'[FIN]),FILTER('Baseline',[Episode Trigger Status]= "Post-Trigger Encounter"}&& 'Baseline',Baseline[Encounter Type] = "101 - Inpatient")))).
 
Any suggestions?
1 ACCEPTED SOLUTION
Megha166
Microsoft Employee
Microsoft Employee

@ce138867 Try This:

 Measure1= CALCULATE(
    DISTINCTCOUNT('Baseline'[FIN]),FILTER('Baseline',AND([Episode Trigger Status]= "Post-Trigger",Baseline[Encounter Type] = "IP")))

View solution in original post

5 REPLIES 5
Megha166
Microsoft Employee
Microsoft Employee

@ce138867 Try This:

 Measure1= CALCULATE(
    DISTINCTCOUNT('Baseline'[FIN]),FILTER('Baseline',AND([Episode Trigger Status]= "Post-Trigger",Baseline[Encounter Type] = "IP")))

Thanks @Megha166, that worked like a charm!

@ce138867 

Measure1= CALCULATE(
    DISTINCTCOUNT('Baseline'[FIN]),FILTER('Baseline',AND([Episode Trigger Status]= "Post-Trigger",Baseline[Encounter Type] = "IP")))

ce138867
Resolver II
Resolver II

NVM, I saw that I had a "}" that I needed to delete. With that removed, I now get the error: Too many arguments were passed to the FILTER function. The maximum argument count for the function is 2.

@ce138867 

 

Try This

 

CALCULATE(
    DISTINCTCOUNT(
        'Baseline'[FIN]
        ),
       FILTER('Baseline',
       [Episode Trigger Status]= "Post-Trigger Encounter"
      &&
     'Baseline',Baseline[Encounter Type] = "101 - Inpatient"
     )
)
 
 
Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!

Helpful resources

Announcements
Fabric Data Days is here Carousel

Fabric Data Days 2026

Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.