The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.
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
User | Count |
---|---|
65 | |
62 | |
60 | |
54 | |
30 |
User | Count |
---|---|
180 | |
88 | |
72 | |
48 | |
46 |