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

Virtual Column - Canvas App

Team how to derive the  the virtual column result in the same query . Tried with follows but could not ,

 

Following formula.

Test1.Run(User().Email,
JSON(With( {TheTable:
Filter(ShowColumns(Dailyinventory,"crf99_sno","crf99_materialdesc","crf99_materialno","createdon","crf99_bbd","crf99_qty"),DateDiff(createdon, Today(),Days) =0)},
ShowColumns(AddColumns(GroupBy(TheTable,"crf99_materialdesc","NewGroup"),
"Materialno",First(NewGroup).crf99_materialno,
"Qty",Sum(NewGroup,crf99_qty),

"Created On",Last(NewGroup).createdon,
"bbd",Last(NewGroup).crf99_bbd,
"Sap-Stock",LookUp(sapstock,material=First(NewGroup).crf99_materialno ,unrestrictedStock)),

"Created On","bbd","crf99_materialdesc","Materialno","Qty","Sap-Stock")

)))

 

 

Tried with adding following code but no luck .

 

"Diff" , "Sap-Stock" - "Qty"

 

 

Any help much appreciated.

1 ACCEPTED SOLUTION

Accepted Solutions
CNT
Super User
Super User

@AVTS To add virtual (Calculated) columns, you have to use AddColumns() like this,

AddColumns(TheTable, "Diff", 'Sap-Stock' - 'Qty')

View solution in original post

4 REPLIES 4
CNT
Super User
Super User

@AVTS To add virtual (Calculated) columns, you have to use AddColumns() like this,

AddColumns(TheTable, "Diff", 'Sap-Stock' - 'Qty')
CNT
Super User
Super User

@AVTS Hope the solution worked!

 

Please remember to give a 👍 and accept the solution as it will help others in the future.

AVTS
Post Partisan
Post Partisan

Yes . It worked. Thank you .

@AVTS Glad to help!

 

Please remember to give a 👍 and accept the solution as it will help others in the future.

Helpful resources

Announcements
PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

May UG Leader Call Carousel 768x460.png

What difference can a User Group make for you?

At the monthly call, connect with other leaders and find out how community makes your experience even better.

Top Solution Authors
Top Kudoed Authors
Users online (3,020)