Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
If I have figures like
AS 1,2,3,4
2. AS 1,3,4
And I want to extract only those where 2 appears and put it in a different column, how can I do that?
Solved! Go to Solution.
Hey @Anonymous ,
in addition to the solution @amitchandak already provided here is another one that is a little more detailed. Here the text 1,2,3,4 will be converted into a list, then the list items will be checked if one is 2. This prevents that a list item like 12 will being tested positive.
You can use this snippet inside the Power Query Custom Column dialog:
if List.Contains(
Text.Split( [else] , "," ) , "2" )
then "contains 2"
else "does not contain 2"
A screenshot:
And the result:
Hopefully, this provides what you are looking for.
Regards,
Tom
Hey @Anonymous ,
in addition to the solution @amitchandak already provided here is another one that is a little more detailed. Here the text 1,2,3,4 will be converted into a list, then the list items will be checked if one is 2. This prevents that a list item like 12 will being tested positive.
You can use this snippet inside the Power Query Custom Column dialog:
if List.Contains(
Text.Split( [else] , "," ) , "2" )
then "contains 2"
else "does not contain 2"
A screenshot:
And the result:
Hopefully, this provides what you are looking for.
Regards,
Tom
@Anonymous ,
In a new column power query
if Text.Contains([Column], "2") then [Column] else null
in DAX, a new column
if(Containsstring([Column], "2") ,[Column] ,blank())
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!