Forum Discussion
vidyasagar159
5 years agoHelper II
Conditional Column on dynamical Combination delimiters values
Hi All, Need some help. I am trying to achieve the below requirement. By using if else condition I can achieve the below result set. However, the combinations of the "Fruit Long Name" changes. dynam...
- 5 years ago
Try this custom column
=let mylist=Text.Split([Fruit Long Name],",") in Text.Combine( List.Transform(mylist, (x)=> Text.At(Text.Trim(x),0)) , ",")
vidyasagar159
5 years agoHelper II
Thanks for the response. But the problem with your code is. It wont work when there is a new fruit combination is added. for example, let's say I have published this report and later new record has been added to the data source column called "Apple, Banana, Plum, Mango". But my result set will show only "A, B, P". What I wanted is "A, B, P, M". The combinations changes often.
Zubair_Muhammad
5 years agoCommunity Champion
Try this custom column
=let mylist=Text.Split([Fruit Long Name],",")
in
Text.Combine(
List.Transform(mylist, (x)=> Text.At(Text.Trim(x),0))
,
",")- vidyasagar1595 years agoHelper II
@Zubair_Muhammad It worked as expected. Thank you.