The result of the following equation SUM ( S

The result of the following equation

SUM ( SELECT (WAREHOUSE[PRODUCT NAME], [QUANTITY] = [_THISROW].[PRODUCT NAME]))

Does not sum on its own with the inventory table when adding new items in the quantities section.

I noticed that when I press to modify in one row in the inventory table and re-save without any modification, the equation works and shows the result of the sum of the quantities entered in the warehouse

Is there a better way to show the sum quantities in the warehouse without opening the registry, modifying it and closing it?

Attached image example of the tables used and the location of the equation used

(I add quantities to the table, the program doesnโ€™t sum automatically. I have to open register, save and closeโ€ฆso that program update quantities)

Solved Solved
0 21 688
1 ACCEPTED SOLUTION

@UNITED_SKATEBOARDS

Use Sumif

in spreadsheet formula in quantity column of Stock table

View solution in original post

21 REPLIES 21

SUM(SELECT (WAREHOUSE[QUANTITY], [PRODUCT NAME] = [_THISROW].[PRODUCT NAME]))

@Levent_KULACOGLU My apologies,

This error in code is only in the post. I actually used the function properly. And the function works fine ( no errors )

SUM(SELECT (WAREHOUSE[QUANTITY], [PRODUCT NAME] = [_THISROW].[PRODUCT NAME]))

My problem is that the function does not

SUM

automaticaly

(I add quantities to the table, the program doesnโ€™t sum automatically. I have to open register, save and closeโ€ฆso that program update quantities)

@UNITED_SKATEBOARDS what @Fernando_Lopez saying that use the expression =[VirtualColumnName] in the AppFormula property of your [Quantity] column

You need combine both.

Virtual column for show automatically updated data like @Aleksi_Alkio

suggested and the โ€œrealโ€ column with the APPFORMULA to save the data to your spreadsheet

@UNITED_SKATEBOARDS

You need to write a spreadsheet formula. ( You will find it at the last in edit column definition) It will update automatically in the excel but you will need to write a different formula according to excel.

@UNITED_SKATEBOARDS

Use Sumif

in spreadsheet formula in quantity column of Stock table

@Sdfaheemuddin

Thank you very much i tried " SUMIF "

in Spreadsheet formula

now the program is doing as required.

P.S.

I had to modify a section in your formula to make it run properly.

From

SUMIF(โ€˜WAREHOUSEโ€™!B:B,B2,โ€˜WAREHOUSEโ€™!A:A)

TO

SUMIF(โ€˜WAREHOUSEโ€™!B[2]:B[2],RC[-2],โ€˜WAREHOUSEโ€™!A[4]:A[4])

Also Thank You All For Help

Happy to know it worked.

Please keep in mind that, when your data size grows up, it will take time for the spreadsheet formula to calculate the result, hence you may not be able to see the calculation result immediately after the sync. Therefore, using a VC and then appending it as an expression in the AppFormula property of the physical column will yield to a better result in terms of efficiency.

Agree with @Levent_KULACOGLU and also you keep the logic of your app

just in appsheet, itโ€™s better for the app maintenance

Also there is this: in general gSheet has a limitation of 2M cells for data handling. This 2M limit is considered for text only and provided you have formulas (especially reference formulas or complex expressions), this 2M limit drastically reduces. What you have done, basically creates a spreadsheet function in each cell when you create a record. Therefore I humbly suggest to re-consider your approach.

Is this expression in a Virtual Column?

@Levent_KULACOGLU

thank for the information

bro. it is very useful.

can you give me example on how you can append VC to AppFormula as expression.

my programming is beginner and I dont understand some technical words. maybe I already do it and I dont know. can you give me example.

@Levent_KULACOGLU

Yes this is an example to show u my problem. I have the original program do you need to see it ?

What Mr Levent is trying to explainโ€ฆ your Quantity column needs to be a virtual column (Stocks table). At this moment itโ€™s a normal column and you need to open & save if you want to see the status correctly.

can you plz tell me how you make virtual column. can you give me example.

I have the program. I want to share it with you. so you can view it for reference. how can I share it.

Open the correct table from Data > Columns and in the bottom of that column structure you will see a โ€œ+ Virtual columnโ€. When you click that text, it will add you a virtual column.

@Aleksi_Alkio

I tried this virtual column with my code. It works fine and shows the updated value at the same time.

Problem with virtual column, it will not write on the Excel sheet.

The resulting value is shown on program/ application sheet, but not stored on Excel file.

How can make it so that the results are also stored on Excel sheet

In the column that you want to save the value try this in APP_FORMULA: =[Virtual Column]

@Fernando_Lopez

I tried this

=[Virtual Column]

in APP_FORMULA

It doesnโ€™t sum automatically. I have to open register, save and closeโ€ฆso that program update quantities

I can see the updating in Virtual Column only

Do i need to send you a video clip to illustrate?

I think use virtual column in appsheet and sumif in your excel in case you need to store data. (I did like this)

Top Labels in this Space