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

A new Data Days event is coming soon! This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. Don't miss out.

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
May Power BI Update Carousel

Power BI Monthly Update - May 2026

Check out the May 2026 Power BI update to learn about new features.

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

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.