Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
Hey there,
I'm trying to use the IN operator in the following formula but I'm not having any luck.
Earned Hours Without PT = SUMX ( FILTER ( 'Transactions', MID ( RELATED ( 'Account'[Secondary Code] ), 6, 1 ) IN { "1", "3" } ), 'Transactions'[Earned Hours] )
When I add the measure to a table, i get the error "...The syntax for 'IN' is incorrect...". From what I can tell by seaching online, the IN operator seems to be supported and I think I'm using it correctly. If I use the OR function like this:
Earned Hours Without PT = SUMX ( FILTER ( 'Transactions', OR ( MID ( RELATED ( 'Account'[Secondary Code] ), 6, 1 ) = "1", MID ( RELATED ( 'Account'[Secondary Code] ), 6, 1 ) = "3" ) ), 'Transactions'[Earned Hours] )
It works as expected without error. What am I missing? Am I using IN incorrectly?
Hi @JayFitchett,
From your first formula, it seems that the syntax should be right.
I have made a test with the function similar with yours, but I haven't get any error.
Could you please paste the complete error message?
I would appreciate it if you could share a dummy pbix file which can reproduce your issue, so that we can help further investigate on it? You can upload it to OneDrive or Dropbox and post the link here. Do mask sensitive data before uploading.)
Best Regards,
Cherry