Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Building Power Apps
Unanswered

Concat with condition

Like (0) ShareShare
ReportReport
Posted on 16 Jan 2023 11:52:42 by 15,665 Super User 2024 Season 1

Hi everyone,

 

@WarrenBelz provided a solution to the following post.

 

https://powerusers.microsoft.com/t5/Building-Power-Apps/Combine-multiple-rows-into-a-single-row-based-on-a-common-field/td-p/1892025

 

I was wondering if I could take this further and apply a condition to the concat statement?

 

In the example below, I want to combine multiple rows into a single row based on a common identifier (Role ID) and where the Active column equals “Yes”

 

example.png

 

Best regards,

Ami

Categories:
  • Ami K Profile Picture
    15,665 Super User 2024 Season 1 on 16 Jan 2023 at 21:05:07
    Re: Concat with condition

    Thanks for the solution @Drrickryp.

     

    Long shot, but is there a way to do this without filtering the source table? There could be a scenario in future where I need to concat an additional column from the same table, but without filtering on active.

     

    ClearCollect(
    
     col_ConcatEmployees,
    
     AddColumns(
    
     GroupBy(
    
     People_Data,
    
     "cr37a_role_id_display",
    
     "Data"
    
     ),
    
     "Assigned Employees",
    
     Concat(
    
     Data,
    
     new_employeename,
    
     ", "
    
     ),
    
     "People_RecordID",
    
     Text(
    
     Concat(
    
     Data,
    
     new_people_dataid,
    
     ", "
    
     )
    
     )
    
     )
    
     );

     

  • Drrickryp Profile Picture
    Super User 2024 Season 1 on 16 Jan 2023 at 14:04:40
    Re: Concat with condition

    @Amik

    With({_items: Filter(  People_Data_Table, Active ='Yes')},

    AddColumns(
    GroupBy(
    _items,
    "Role ID",
    "Data"
    ),
    "Role",
    First(Data).Role,
    "Assigned Employees",
    Concat(
    Data,
    Name,
    ","
    )
    )

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

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Leaderboard > Power Apps - Building Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 298 Most Valuable Professional

#2
MS.Ragavendar Profile Picture

MS.Ragavendar 169

#3
stampcoin Profile Picture

stampcoin 130

Overall leaderboard
Loading started