cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
AVTS
Super User
Super User

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

Helpful resources

Announcements
Ignite 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Power Apps Africa Challenge 2022

Power Apps Africa Challenge

Your chance to join an engaging competition of Power Platform enthusiasts.

Users online (1,265)