March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
Hi
Can someone please help me to capture the accurate expression on DAX.
I would like to use the OR operator for multiple values like below but sounds I do something bad as I have an error message.
Thanks,
FILTER (
'Product'[Product Line Identifier] = "6J" ||
'Product'[Product Line Identifier] = "2C" ||
'Product'[Product Line Identifier] = "KV")
)
Solved! Go to Solution.
Hi,
It seems something is wrong with the other part of your formula. Please post your formula here. You can replace the confidential part. Or maybe you can try operator “in” like this: 'Product'[Product Line Identifier] in {“6J”, “2C”, “KV”} (Values in brace).
Best Regards!
Dale
Hi,
It seems something is wrong with the other part of your formula. Please post your formula here. You can replace the confidential part. Or maybe you can try operator “in” like this: 'Product'[Product Line Identifier] in {“6J”, “2C”, “KV”} (Values in brace).
Best Regards!
Dale
Hi Dale
Thanks a lot
It works now !
Have a nice day
Muriel
My pleasure.
Best Regards!
Dale
Your OR statement is perfectly fine. You've just left out the first argument of your FILTER function.
FILTER(<table>, <conditional statement>)
What you've done is
FILTER(<conditional statement>)
So you should write
FILTER (
'Product',
'Product'[Product Line Identifier] = "6J" ||
'Product'[Product Line Identifier] = "2C" ||
'Product'[Product Line Identifier] = "KV")
)
Proud to be a Super User!
Thanks for your reply
However it does not work.
My Table is "Product"
My field is "Product Line Identifier"
May I need to add a function like EVALUATE ?
Thanks
Muriel
Additional Informations
Those are columns ( Not measures)
I need to select lot of different Values of Product Line Identifier.
Howeer, when I sue the Equal Operator and select on the drop down list all the different values I need, it does not work.
That's why I try to cover it thru another way but i'm not enough knowledgeable in DAX to generate a correct OR Expression.
Thanks
Muriel
Formula? I can't tell you what to change if I can't see what it is.
Proud to be a Super User!
No you do not need EVALUATE. Show me the full formula you're using, not just the FILTER part. Is it a measure or a column?
Proud to be a Super User!
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
User | Count |
---|---|
93 | |
87 | |
84 | |
76 | |
49 |
User | Count |
---|---|
163 | |
148 | |
103 | |
74 | |
55 |