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

Community site session details

Session Id :
Power Apps - Building Power Apps
Unanswered

Group distinct values across lines and columns

(0) ShareShare
ReportReport
Posted on by 71
Hi team, I am looking for some advice around grouping distinct values from a table.
 
As you can see below, you have three lines where there is a mixture of names defined as PM, Assistant.
 
Ultimately for each of the ID's, I would like to end up with an additional column showing each of the distinct names across those two columns.
 
Any thoughts, for most efficient way would be great.
 
ID Title Project     PM,       Assistant New Column
3 Variable 1     joe       steve Joe; Steve
3 Variable 2     steve       joe Joe; Steve
3 Variable 3     Joe   Joe; Steve
 
 
I use this to send emails within the app, but currently this would analyze all three lines and send Joe three emails.
But in the new column, this would group to just one and ultimately one email.
 
Thank you
I have the same question (0)
  • Meekou Profile Picture
    200 Moderator on at
    Group distinct values across lines and columns
    ​For your request, you will need to use GroupBy to merge the rows for same ID.
     
    Here is a sample demo
    ClearCollect(
        GroupedProject,
        AddColumns(
            GroupBy(
                Projects,
                ID,
                PMAssistantTable
            ),
            PMAssistant,
            Concat(
                Filter(
                    Distinct(
                        Split(
                            Concat(
                                ThisRecord.PMAssistantTable,
                                Lower(PM) & "," & Lower(Assistant) & ","
                            ),
                            ","
                        ),
                        Value
                    ),
                    Value <> ""
                ),
                Value,
                ","
            )
        )
    )
    Test Data
    Test Result
    Regards,
    Meekou
    Personal Support
    ​

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Chiara Carbone – Community Spotlight

We are honored to recognize Chiara Carbone as our Community Spotlight for November…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 671 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 424 Super User 2025 Season 2

#3
developerAJ Profile Picture

developerAJ 243

Last 30 days Overall leaderboard