Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi,
I want to create a conditional column with below conditions – how to create this?
OR
2.PageURL - contains – ghi AND PageURL - contains – jkl
I don’t want to add 2 times PageURL in my filter section, because it’s not giving correct results
Solved! Go to Solution.
Flag = IF( (SEARCH("abc",Test256Search[Name],,0)>0 && SEARCH("def",Test256Search[Name],,0)>0) || (SEARCH("ghi",Test256Search[Name],,0)>0 && SEARCH("jkl",Test256Search[Name],,0)>0) ,"Y","N" )
Proud to be a PBI Community Champion
Kindly mark the helpful answer as a solution if you feel that makes sense.If not,please share more data and your expected output.
Regards,
Cherie
@adityavighne Please try this as a New column in Data pane using below DAX
Flag = IF( (SEARCH("abc",Table[PageURL])>0 && SEARCH("def",Table[PageURL])>0) || (SEARCH("ghi",Table[PageURL])>0 && SEARCH("jkl",Table[PageURL])>0) ,"Y","N" )
Proud to be a PBI Community Champion
thanks for the reply.
I'm getting below error -
"The search Text provided to function 'SEARCH' could not be found in the given text.
The search function given an error when the condition provided is not valid. Wrap it in ISERROR function to capture the error.
Something like this:
Flag = IF( iserror((SEARCH("abc",Table[PageURL])>0 && SEARCH("def",Table[PageURL])>0))=false() || iserror((SEARCH("ghi",Table[PageURL])>0 && SEARCH("jkl",Table[PageURL])>0))=false() ,"Y","N" )
iserror gives boolean value - which will not resolve my problem.
I resolve this issue -
Flag = IF( (SEARCH("abc",Test256Search[Name],,0)>0 && SEARCH("def",Test256Search[Name],,0)>0) || (SEARCH("ghi",Test256Search[Name],,0)>0 && SEARCH("jkl",Test256Search[Name],,0)>0) ,"Y","N" )
Proud to be a PBI Community Champion
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
114 | |
99 | |
83 | |
70 | |
60 |
User | Count |
---|---|
150 | |
115 | |
104 | |
89 | |
65 |