cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
WhatisPowerApps
Advocate II
Advocate II

Split text by delimiter for column

Hi,

How do I split text multiple texts by delimiter for the column? How do I go about getting the Result table below? 

 

MyTable

Manager
Name1
Name3, Name4, Name5
Name2
Name7, Name6

 

Result

Manager
Name1
Name2
Name3
Name4
Name5
Name6
Name7
1 ACCEPTED SOLUTION

Accepted Solutions
RandyHayes
Super User
Super User

@WhatisPowerApps 

Always good to present all information 😉

 

The formula would change to:

Sort(
    ForAll(
        GroupBy(
            Ungroup(
                ForAll(MyTable, {Manager: Split(Manager, ", "), Country: Country}),
                "Manager"
            ),
            "Result", "_data"
        ),
        {Manager: Result, Country:First(_data).Country}
    ),
    Manager
)
_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

View solution in original post

5 REPLIES 5
RandyHayes
Super User
Super User

@WhatisPowerApps 

The following formula will provide you with your results:

RenameColumns(
    Sort(
        Distinct(
            Ungroup(
                ForAll(MyTable, {Manager: Split(Manager, ", ")}),
                "Manager"
            ),
            Result
        ),
        Result
    ),
    "Result", "Manager"
)

 

I hope this is helpful for you.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

@RandyHayes 
Thanks for helping me. What if I have another column?

 

MyTable

ManagerCountry
Name1USA
Name3, Name4, Name5UK
Name2UK
Name7, Name6USA

 

Result

ManagerCountry
Name1USA
Name2UK
Name3UK
Name4UK
Name5UK
Name6USA
Name7USA
RandyHayes
Super User
Super User

@WhatisPowerApps 

Always good to present all information 😉

 

The formula would change to:

Sort(
    ForAll(
        GroupBy(
            Ungroup(
                ForAll(MyTable, {Manager: Split(Manager, ", "), Country: Country}),
                "Manager"
            ),
            "Result", "_data"
        ),
        {Manager: Result, Country:First(_data).Country}
    ),
    Manager
)
_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

Thank you so much for helping me out with this formula! 

 

Sorry for not presenting all information 🙁

RandyHayes
Super User
Super User

@WhatisPowerApps 

No worries.  It's an easy flip of the formula!

Gald it was helpful.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (6,053)