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 hope all is well. I am working on a project for my team. I have a column in my table that contains a certain amount of codes in one string. What I want to do is create a column where if I type in ANY code I will get a list of people who have that code in their column. It seems as if the code I am using is only bringing the first value/code that exists for that person.
Here's my code......custom column....
= if Text.Contains ([descriptor] , "ALUM") then "ALUMS"
else if Text.Contains ([descriptor] , "ALND") then "non"
else if Text.Contains ([descriptor] , "FRND") then "Friend"
else " "
This code only brings back those people where the code is the first value in that string. Someone might have codes FRND ALUM, but if I chose ALUMS from the filter this person won't show because ALUM is not the first code. How can i make this work where if I type in a code I want everyone to show who has that code no matter which order it is in?
Please help!!!
I don't see how you could do this in Power Query if you desire user interaction. I would do this in DAX using CONTAINSSTRING and I wouldn't use a calculated column, I would use a measure.
Can you please show me an example where I can use it using CONTAINSSTRING for a measure?
@Greg_Deckler wrote:I don't see how you could do this in Power Query if you desire user interaction. I would do this in DAX using CONTAINSSTRING and I wouldn't use a calculated column, I would use a measure.
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 |
---|---|
13 | |
2 | |
2 | |
1 | |
1 |