Skip to main content
Announcements
Defect acknowledgement with Nprinting Engine May 2022 SR2, please READ HERE
cancel
Showing results for 
Search instead for 
Did you mean: 
P_qlik
Partner - Contributor III
Partner - Contributor III

Sum in excel nprinting

Hi,

I need to make the sum of the values in excel using a table object, but if I put this formula: SUM(B2) where B2 is the cell where there are the values, in the output I have the count of the number of rows, not values

For example I have this numbers: 1,5,7,6,  the result is 4 but I need 19

Which formula should I use?

Thank you

Labels (2)
1 Solution

Accepted Solutions
Ruggero_Piccoli
Support
Support

Hi,

You can create a native Excel table and add formulas as explained in https://help.qlik.com/en-US/nprinting/February2021/Content/NPrinting/ExcelReports/Make-Calculated-Co...

If you need totals and subtotals you can follow the instruction in https://help.qlik.com/en-US/nprinting/February2021/Content/NPrinting/ExcelReports/Excel-Reports-Nest... but not that using levels require longer report generation time so I suggest to work with native Excel tables. Note that the formula, for example a sum(), must include two rows so Qlik NPrinting understands that it has to expand it.

Note also that Qlik NPrinting, by default, adds as many rows as it needs when creating Excel reports. This can change cells references and it can be modified by changing the Expand Range property https://help.qlik.com/en-US/nprinting/February2021/Content/NPrinting/ReportsDevelopment/Designer-pro....

Best Regards,

Ruggero



Best Regards,
Ruggero
---------------------------------------------
When applicable please mark the appropriate replies as CORRECT. This will help community members and Qlik Employees know which discussions have already been addressed and have a possible known solution. Please mark threads with a LIKE if the provided solution is helpful to the problem, but does not necessarily solve the indicated problem. You can mark multiple threads with LIKEs if you feel additional info is useful to others.

View solution in original post

5 Replies
sk88024
Contributor III
Contributor III

Hi

"SUM(B2) where B2 is the cell where there are the values" -  B2 is the single cell but you have mentioned that numbers are like 1, 5, 7, 6, then there should be multiple cells.  If my understanding is not correct, can you please elaborate. 

sk88024_0-1617187409178.png

P_qlik
Partner - Contributor III
Partner - Contributor III
Author

hi,

yes it's correct, but the values change every month so I need a dynamic formula, today there are 4 values, tomorrow maybe 5, I need something that gives me the correct sum and it's based on the number that changes

sk88024
Contributor III
Contributor III

Can you provide some sample data and qvw file. It may help us in finding the solution.

P_qlik
Partner - Contributor III
Partner - Contributor III
Author

I can send you 2 photoS:

I should work on field quantity and when I click on anteprima (preview), at the end of the excel I need to have the sum of all values, something like this:

Immagine.png

Immagine1.png

thank you

Ruggero_Piccoli
Support
Support

Hi,

You can create a native Excel table and add formulas as explained in https://help.qlik.com/en-US/nprinting/February2021/Content/NPrinting/ExcelReports/Make-Calculated-Co...

If you need totals and subtotals you can follow the instruction in https://help.qlik.com/en-US/nprinting/February2021/Content/NPrinting/ExcelReports/Excel-Reports-Nest... but not that using levels require longer report generation time so I suggest to work with native Excel tables. Note that the formula, for example a sum(), must include two rows so Qlik NPrinting understands that it has to expand it.

Note also that Qlik NPrinting, by default, adds as many rows as it needs when creating Excel reports. This can change cells references and it can be modified by changing the Expand Range property https://help.qlik.com/en-US/nprinting/February2021/Content/NPrinting/ReportsDevelopment/Designer-pro....

Best Regards,

Ruggero



Best Regards,
Ruggero
---------------------------------------------
When applicable please mark the appropriate replies as CORRECT. This will help community members and Qlik Employees know which discussions have already been addressed and have a possible known solution. Please mark threads with a LIKE if the provided solution is helpful to the problem, but does not necessarily solve the indicated problem. You can mark multiple threads with LIKEs if you feel additional info is useful to others.