Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
So i am in a pickle
i have to find certain customers from a survey results if they fill anything like sucidal or self harm and i need to flag it.
so i used containsstring to find out if those words are there or not
Now i need a code to return "True" if any row value in that column contains "true"
if all the row values in the column is false then "false"
can anybody help
adding data here
Solved! Go to Solution.
Hi @tijuemson
This Measure will work, but you haven't provided actual data to test against.
Measure = MAX('Table'[Column1])
Doing a MAX on a text column will return "True" if it exists anywhere, otherwise you will get "False". T comes after F in the alphabet. This is assuming the column can only contain "True"or "False" as you described.
Regards
Phil
Proud to be a Super User!
Hi @tijuemson
This Measure will work, but you haven't provided actual data to test against.
Measure = MAX('Table'[Column1])
Doing a MAX on a text column will return "True" if it exists anywhere, otherwise you will get "False". T comes after F in the alphabet. This is assuming the column can only contain "True"or "False" as you described.
Regards
Phil
Proud to be a Super User!
data is added thanks
i cant unpivot it because the data is in a funny way
Hi @tijuemson
Please be as clear as you can about the data you are working with and the desired result. As you can see from the variety of answers you've received, we're all guessing to some extent as to what your data looks like and what you want.
Regards
Phil
Proud to be a Super User!
Thx @tijuemson
So that's the Excel file but you saisd you already brough the data into PBI and wrote some DAX to create a column containing either True or False ?
Have you tried the Measure I provided?
regards
Phil
Proud to be a Super User!
i just copied that file from the powerbi to excel.
the red alert table is a created column with containsstring
and yes i tried the formula but it returns False eventhough there is true in there
Hi @tijuemson
Any chance you can provide your PBIX file? I just loaded that data from Excel into PBI and my measure works correctly - download this PBIX file to check.
regards
Phil
Proud to be a Super User!
Hi Phil thanks for the help
i just converted the red alert one(which was in true/false) to Text and it works now
thank you so much
Hi,
Please try with the below dax funtion.
Appreciate a Kudos! 🙂
If this helps and resolves the issue, please mark it as a Solution! 🙂
Regards,
N V Durga Prasad
Hi Prasad,
I have done this part.
but now i want to add this to the report.
but since i am doing columnwise it only shows the first or last value
but i want to return True even if atleast one true is there
and if all are no then no
thanks
@tijuemson , use search that is not case sensitive
example of new column
if( search("Any word",Table[column],,0) >0, true(), false())
@tijuemson , for that you need a new column like , this will have same status for a id, say survey id
if(isblank(maxx(filter(Table,[survey id] = earlier([survey id]) && [Flag] = true()),[survey id])), false(), true())
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
| User | Count |
|---|---|
| 97 | |
| 76 | |
| 52 | |
| 51 | |
| 46 |