cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
AVTS
Helper V
Helper V

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
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Power Apps June 2021

June Power Apps Community Call

Don't miss the call this month on June 16th - 8a PDT

Top Solution Authors
Top Kudoed Authors
Users online (59,927)