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.
@AVTS Glad to help!
Please remember to give a 👍 and accept the solution as it will help others in the future.
Yes . It worked. Thank you .
@AVTS Hope the solution worked!
Please remember to give a 👍 and accept the solution as it will help others in the future.
@AVTS To add virtual (Calculated) columns, you have to use AddColumns() like this,
AddColumns(TheTable, "Diff", 'Sap-Stock' - 'Qty')
WarrenBelz
146,731
Most Valuable Professional
RandyHayes
76,287
Super User 2024 Season 1
Pstork1
66,077
Most Valuable Professional