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 August 31st. Request your voucher.
Hi community,
i have this formula:
Solved! Go to Solution.
Hi @PedroPascual ,
This might be better illustrated with an example:
Hope it helps!
Best regards,
Community Support Team_ Scott Chang
If this post helps then please consider Accept it as the solution to help the other members find it more quickly.
Hi @PedroPascual ,
This might be better illustrated with an example:
Hope it helps!
Best regards,
Community Support Team_ Scott Chang
If this post helps then please consider Accept it as the solution to help the other members find it more quickly.
Thanks @Anonymous
what i do not understand is why with your formula the results are NO, when it should be Yes.
Thanks in advance
Syntax is:
CONTAINSSTRING( <Within Text>, <Find Text> )
https://learn.microsoft.com/en-us/dax/containsstring-function-dax
Hope this is what you are looking for.
Regards,
but i would not like to change the formula, just change the = to contains
IF (
AND (
AND (
CONTAINSSTRING('_CombinedMasterFile'[Identity ], "DUCTS", )
etc....
Hi @PedroPascual ,
Based on your description, I'm guessing you're wondering if contaion has any symbols like "=" that can stand for equals.And here may be the answer you are looking for, you can check the results as follows:
Measure =
IF (
AND (
AND (
MAX ( '_CombinedMasterFile'[Identity] ) = "DUCTS",
MAX ( '_CombinedMasterFile'[type] ) IN { "Exhaust", "DUCTS" }
),
MAX ( '_CombinedMasterFile'[Category] )
IN { "Types", "Fittings", "Accessories", "Terminals", "Flex" }
),
"YES",
"NO"
)
Please feel free to correct me and provide more information if I have misunderstood you!
An attachment for your reference. Hope it helps!
Best regards,
Community Support Team_ Scott Chang
If this post helps then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Anonymous
thanks for your response i thought was the solution but it does not work for me.
This is based on your formula:
but previously this formula worked:
I want to reduce the formula with a action "contains" instead of the "="
Hi @PedroPascual ,
"in" means that there are these fields, which can be interpreted as being equal to one of them, and if you explicitly say contains, it requires the use of DAX. or you can create conditional columns through Power Query, a very simple way.
Hope it helps!
Best regards,
Community Support Team_ Scott Chang
If this post helps then please consider Accept it as the solution to help the other members find it more quickly.
User | Count |
---|---|
78 | |
73 | |
38 | |
30 | |
28 |
User | Count |
---|---|
107 | |
100 | |
55 | |
49 | |
45 |