cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
RMDNA
Helper III
Helper III

Concatenating to string from GroupBy items

Hi all,

 

I couldn't quite figure out how to phrase this question, so I hope the following explanation makes sense. Data is system-generated CDS tables.

 

I have a series of time entries as follows:

 

DatePersonProjectTask

Hours

GUID

03/20/21JaneData ModernizationDevelopment4abcdef
03/20/21JaneData ModernizationMeeting2123456

 

I've used GroupBy to roll up to a project level:

 

DatePersonProjectHours
03/20/21JaneData Modern.6

 

However, I still need the separate GUIDs attached to the aggregated entry so I can use them elsewhere. What I'm hoping I can do is somehow concatenate them during the GroupBy to appear as follows:

 

DatePersonProjectHoursGUIDs
03/20/21JaneData Modernization6abcdef, 123456

 

Is this possible, or at least not horrendously complex? The existing aggregation formula is below:

 

 

AddColumns(
        GroupBy(
            AddColumns(
                Filter(
                    'Time Entries','Time Entries (Views)'.'Time Entries for Approval',
                    Date > VarSelectedStartDate && Date < VarSelectedEndDate),
                "DateString", Text(Date, ShortDate),"ResourceName",'Bookable Resource'.Name, "ProjectName", Project.'Project Name'),
            "DateString","ResourceName","ProjectName","Data"),
        "Hours",Sum('Data',Duration))

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
rubin_boer
Super User
Super User

hi @RMDNA add another column. 

AddColumns(
GroupBy(
AddColumns(
Filter(
'Time Entries','Time Entries (Views)'.'Time Entries for Approval',
Date > VarSelectedStartDate && Date < VarSelectedEndDate),
"DateString", Text(Date, ShortDate),"ResourceName",'Bookable Resource'.Name, "ProjectName", Project.'Project Name'),
"DateString","ResourceName","ProjectName","Data"),
"Hours",Sum('Data',Duration)

,"Guids",
Concat('Data', Guid & ", "))

 

Then add another label to your gallery with Text = Left(ThisItem.Guids,Len(ThisItem.Guids)-2)

rubin_boer_0-1617306127026.png

 

hope it helps 

 

 

 
 
hey there if you liked the post give it a thumbs up, and if it solved your question please accept it as a solution.

View solution in original post

2 REPLIES 2
rubin_boer
Super User
Super User

hi @RMDNA add another column. 

AddColumns(
GroupBy(
AddColumns(
Filter(
'Time Entries','Time Entries (Views)'.'Time Entries for Approval',
Date > VarSelectedStartDate && Date < VarSelectedEndDate),
"DateString", Text(Date, ShortDate),"ResourceName",'Bookable Resource'.Name, "ProjectName", Project.'Project Name'),
"DateString","ResourceName","ProjectName","Data"),
"Hours",Sum('Data',Duration)

,"Guids",
Concat('Data', Guid & ", "))

 

Then add another label to your gallery with Text = Left(ThisItem.Guids,Len(ThisItem.Guids)-2)

rubin_boer_0-1617306127026.png

 

hope it helps 

 

 

 
 
hey there if you liked the post give it a thumbs up, and if it solved your question please accept it as a solution.
RMDNA
Helper III
Helper III

That was a lot simpler than I thought it would be. Thank you!

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 (3,292)