cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
AVTS
Post Patron
Post Patron

Canvas App - Sum up the dual items

I have canvas app. inwhich i have button click to send csv attachement to email. 

 

My Table follows,

AVTS_1-1620248200343.png

 

Button Onselect formula,

 

Test1.Run(User().Email,JSON(ShowColumns(Dailyinventory,"crf99_materialdesc","crf99_materialno","createdon","crf99_bbd","crf99_qty")))

 

Currenty  : Reports shows same as table.

Expected :  Dual line item same material no qty should merged while sending report.

 

examplebelow

 

Multi line item Water 13 , Water 19s are merged togther in the report.

 

AVTS_2-1620248299598.png

 

1 ACCEPTED SOLUTION

Accepted Solutions
v-bofeng-msft
Community Support
Community Support

Hi @AVTS :

please try:

 

Test1.Run(User().Email,JSON(

With(

 {TheTable:ShowColumns(Dailyinventory,"crf99_materialdesc","crf99_materialno","createdon","crf99_bbd","crf99_qty")},

 ShowColumns(AddColumns(GroupBy(TheTable,"crf99_materialdesc","NewGroup"),"CreateOn",Last(NewGroup).createdon,"bbd",Last(NewGroup).crf99_bbd,"Materialno",First(NewGroup).crf99_materialno,"Qty",Sum(NewGroup,crf99_qty)),"CreateOn","bbd","crf99_materialdesc","Materialno","Qty")

 )

)

 

Best Regards,

Bof

View solution in original post

1 REPLY 1
v-bofeng-msft
Community Support
Community Support

Hi @AVTS :

please try:

 

Test1.Run(User().Email,JSON(

With(

 {TheTable:ShowColumns(Dailyinventory,"crf99_materialdesc","crf99_materialno","createdon","crf99_bbd","crf99_qty")},

 ShowColumns(AddColumns(GroupBy(TheTable,"crf99_materialdesc","NewGroup"),"CreateOn",Last(NewGroup).createdon,"bbd",Last(NewGroup).crf99_bbd,"Materialno",First(NewGroup).crf99_materialno,"Qty",Sum(NewGroup,crf99_qty)),"CreateOn","bbd","crf99_materialdesc","Materialno","Qty")

 )

)

 

Best Regards,

Bof

View solution in original post

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Power Apps Community Call Jan. 2022 768x460.png

Power Apps Community Call

Please join us on Wednesday, January 19th, at 8a PDT. Come and learn from our amazing speakers!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Top Solution Authors
Top Kudoed Authors
Users online (887)