Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
powerbiwork
Helper I
Helper I

Column Containing Values

Hi, 

 

I'm trying to create something that will get me let's say #TopPlan in a column that contains multiple other values. For example

powerbiwork_0-1608236843432.png

The first column is where all the values are and the second column is a measure I created using dax contains and I wanted anything that says #TopPlan but as you can see it only shows true when it is just only #TopPlan is in it

powerbiwork_1-1608236937975.png

Any idea I can get the rest of #TopPlan with other values as well?

 

Thanks

 

1 ACCEPTED SOLUTION
PhilipTreacy
Super User
Super User

Hi @powerbiwork 

Download PBIX file with these examples.

In Power Query you can add a Custom Column

 

Table.AddColumn(Source, "Custom", each if Text.Contains([TextCol], "#TopPlan") then true else false)

 

textsearchpq.png

 

Or in DAX create a Calculated Column

 

Column = IF(SEARCH("#TopPlan", 'TextTable'[TextCol],,0)>0, True , False)

 

textsearchdax.png

Regards

Phil


If I answered your question please mark my post as the solution.
If my answer helped solve your problem, give it a kudos by clicking on the Thumbs Up.



Did I answer your question? Then please mark my post as the solution.
If I helped you, click on the Thumbs Up to give Kudos.


Blog :: YouTube Channel :: Connect on Linkedin


Proud to be a Super User!


View solution in original post

3 REPLIES 3
powerbiwork
Helper I
Helper I

Thanks so much!

PhilipTreacy
Super User
Super User

Hi @powerbiwork 

Download PBIX file with these examples.

In Power Query you can add a Custom Column

 

Table.AddColumn(Source, "Custom", each if Text.Contains([TextCol], "#TopPlan") then true else false)

 

textsearchpq.png

 

Or in DAX create a Calculated Column

 

Column = IF(SEARCH("#TopPlan", 'TextTable'[TextCol],,0)>0, True , False)

 

textsearchdax.png

Regards

Phil


If I answered your question please mark my post as the solution.
If my answer helped solve your problem, give it a kudos by clicking on the Thumbs Up.



Did I answer your question? Then please mark my post as the solution.
If I helped you, click on the Thumbs Up to give Kudos.


Blog :: YouTube Channel :: Connect on Linkedin


Proud to be a Super User!


Ashish_Mathur
Super User
Super User

Hi,

I suggest you use the SEARCH() function as a calculated column.  Please read more here - SEARCH function (DAX) - DAX | Microsoft Docs


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Top Solution Authors