web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / comma separated column...
Power Apps
Answered

comma separated column to one value per row

(0) ShareShare
ReportReport
Posted on by 15

Hi

 

I'm having a dataverse table with a column "countries" (a single line of text column). People can add multiple countries as comma separated values in this column.

 

I would like to show all distinct countries from the "countries" column and use those in a combobox for filtering. I can't figure out how to create a table/list of the distinct countries from the "countries" column and would appreciate any hints.

 

Best regards

Markus

 

edit: changed "single row text column" to "single line of text column"

Categories:
I have the same question (0)
  • CNT Profile Picture
    10,921 Super User 2024 Season 1 on at

    @asdfasdfasfdasf Use the following example and replace the countries string with the value from your countries column,

    Distinct(Split("UK, USA, India, Australia, UK, Tanzania, Romanina, India", ","), Value)

     

    Please remember to give a 👍 and accept my solution as it will help others in the future.

  • CNT Profile Picture
    10,921 Super User 2024 Season 1 on at

    @asdfasdfasfdasf Did you get it to work???

     

    Please remember to give a 👍 and accept my solution as it will help others in the future.

  • asdfasdfasfdasf Profile Picture
    15 on at

    Dear CNT

     

    Thanks for your reply.

     

    I'm able to split a single string value. I wonder how I can do this with the whole column of a table.

     

    Best regards

    Markus

  • Verified answer
    CNT Profile Picture
    10,921 Super User 2024 Season 1 on at

    @asdfasdfasfdasf Follow this example and replace myTable with your table.

    ClearCollect(myTable, {Countries:"UK, USA, India, Australia, UK, Tanzania, Romanina, India"}, {Countries:"Poland, Argentina, Maldives, Denmark, UK, Poland, Romanina, Denmark"});
    ClearCollect(colSplit, Distinct(Ungroup(ForAll(myTable, Split(ThisRecord.Countries, ",")), "Value"), Value))

    Please remember to give a 👍 and accept my solution as it will help others in the future.

  • asdfasdfasfdasf Profile Picture
    15 on at

    Dear CNT

     

    Thanks again for your reply.

     

    I'm struggling with the string values in your formula. How can I replace those with the column from my table?

     

    Best regards

    Markus

  • asdfasdfasfdasf Profile Picture
    15 on at

    got it to work

  • asdfasdfasfdasf Profile Picture
    15 on at

    The actual formula I used is:

     

    ClearCollect(myTable, dataversetable.columnname);

    ClearCollect(colSplit, Distinct(Ungroup(ForAll(myTable, Split(ThisRecord.columnname, ",")), "Value"), Value))

     

    dataversetable is the name of the dataversetable

    columnname is the name of the column

    myTable and colSplit can be anything

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 339 Most Valuable Professional

#2
11manish Profile Picture

11manish 180

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 88 Super User 2026 Season 1

Last 30 days Overall leaderboard