Looking for solution for the following scenario
Other option could be
Since Balance Left is also being calculated in Sale Table in every row, but stored in corresponding different columns. May be there could be a way that the most recent entry of Balance Left in Sale Table can be updated in SORD Table with every new row added in Sale Table
Any guidance/help appreciated
Solved! Go to Solution.
Hello Neeraj, you would need to run three separate SUM(SELECT()) combinations and adding them together in a virtual column in order to substract that in your SORD table, doing so in a virtual column makes it auto update on every new row (virtual columns re-calculate on every sync), so for example your formula would look like this:
In virtual column โBalance Leftโ
[Qty] - (SUM(SELECT(Sale[Qty_1],[SORD_1]=[_THISROW].[SORD]) + SUM(SELECT(Sale[Qty_2],[SORD_2]=[_THISROW].[SORD]) + SUM(SELECT(Sale[Qty_3],[SORD_3]=[_THISROW].[SORD]))
Bear in mind that the โselectโ function is an expensive formula, and if you have a lot of items in your SORD table it could slow down your app, if you were to use relational tables you could have all your sales quantities lined up on a single column, so you would need only one select()+sum() function to get the value you need.
Hello Neeraj, you would need to run three separate SUM(SELECT()) combinations and adding them together in a virtual column in order to substract that in your SORD table, doing so in a virtual column makes it auto update on every new row (virtual columns re-calculate on every sync), so for example your formula would look like this:
In virtual column โBalance Leftโ
[Qty] - (SUM(SELECT(Sale[Qty_1],[SORD_1]=[_THISROW].[SORD]) + SUM(SELECT(Sale[Qty_2],[SORD_2]=[_THISROW].[SORD]) + SUM(SELECT(Sale[Qty_3],[SORD_3]=[_THISROW].[SORD]))
Bear in mind that the โselectโ function is an expensive formula, and if you have a lot of items in your SORD table it could slow down your app, if you were to use relational tables you could have all your sales quantities lined up on a single column, so you would need only one select()+sum() function to get the value you need.
Thanks @Rafael_ANEIC-PY
Is there any way that this info can be stored in the actual column in the table instead of a virtual column and gets updated with every addition of new row in SALE Table. Bโs this column is linked to some other flow that needs filtering based on this value. So virtual column canโt be used.
In that case you could use the formula i mentioned before as an app formula, and since app formulas only recalculate when you change a value in their row, you need to set up a workflow that automatically invokes an action when a new row is added to the Sale table, letโs call that action โRefreshโ , Refresh should invoke an action that changes at least a single value on all the rows that you wish to refresh, letโs call that second action โChangeโ, itโs common to add a new column to work as a โTriggerโ for these kind of uses, so letโs say you add a new column called โauxโ, now you configure the โChangeโ action to set the values of some columns on given rows, more specifically set the Trigger column a random value, for example uniqueid(), and you wish to do that for all your rows in the SORD table, so the condition for the action would be simply =TRUE.
So, to recap, these are the steps you need to take:
-Create an action that assigns a random value to a row in the SORD table in the Trigger column (i called it Change)
-Create an action that executes the โChangeโ action on a set of rows, this action should reference your SORD table and run for all rows (i called this action Refresh)
-Create a workflow that runs every time thereโs an update or an add in your Sale table, and have it invoke the โRefreshโ function
@Rafael_ANEIC-PY,
This is one is not that is for a non-techie like me so I have opted your 1st recommendation and changed my flows to accommodate that.
Thanks very much!!!
User | Count |
---|---|
33 | |
25 | |
22 | |
21 | |
15 |