Forum Discussion
Convert table to list and use that in function
- 1 year ago
Hi rbabu ,
I hope this information is helpful. Please let me know if you have any further questions or if you'd like to discuss this further. If this answers your question, please Accept it as a solution and give it a 'Kudos' so others can find it easily.
Thank you.
Hi rbabu ,
Thanks for the update. We cannot convert the value '"Afghanistan","Albania",...' to type List.
It seems that CountryLOV2 is currently a text string, not a real Power Query list. Even though it looks like a list, Power Query still treats it as a single text value.
To fix this, you can convert the string into a real list using the Text.Split function. For example.
Then, you can use: List.Contains(CountryLOV2,[Country])
Helpful Docs:
Text.Split - PowerQuery M | Microsoft Learn
List.Contains - PowerQuery M | Microsoft Learn
If my response solved your query, please mark it as the Accepted solution to help others find it easily.
And if my answer was helpful, I'd really appreciate a 'Kudos'.
Great. Yes your right. Its a string. Let me give that a try and get back. Thanks very much!
- V-yubandi-msft1 year agoCommunity Support
Feel free to update us once you try it out.
Regards,Yugandhar.