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: 
Geoffrey_Moss
Contributor
Contributor

Adding Totals grouped by Currency

Hi

In a PixelPerfect report I have a detail table of values in a mixture of currencies. Each value in the detail table is displayed with various dimensions including the currency code.

I need to display a Total for each currency in the Group beneath the table but I haven't been able to get the structure right to display the Totals by Currency.

Firstly, is this possible and secondly, if so, how do I structure the levels to provide the required layout?

Thanks

Labels (2)
1 Solution

Accepted Solutions
Ruggero_Piccoli
Support
Support

Hi,

First solution: Create a main level by currency and nest a level with table used as data source. Then create subtotals and totals as described in https://help.qlik.com/en-US/nprinting/May2022/Content/NPrinting/PixelPerfectReports/Add-Totals-Subto.... This is simpler solution but you will have a table on generated report ordered by currency.

Secondo solution: a short tutorial. The idea is to use PixelPerfect formulas to create calculated fields with subtotals. I create a field with the summary of the product category Babywear and you can do the same by currency. Screenshots are made on the final template so you will se the results from the beginning but you have to build them.

1 - Create a Pixelperfect template and add the data source straight table as a level as usual

2 - Right click on the table and select add calculated field

Ruggero_Piccoli_0-1658390748042.png

3 - Create a calculated field with a condition to filter only data of a specific category (currency in your case)

Ruggero_Piccoli_1-1658390892435.png

4 - Drag and drop the new field in the report where you created the native table as usual

Ruggero_Piccoli_2-1658390969089.png

You can run a preview to check that calculated values are correct. It is not mandatory to add the calculated column in the final report, I added it for didactical reasons. 

5 - Add the Group Footer band where you will insert the totals. Drag and drop the calculated field and set the totals calculation by opening the summary widonw as explained in the linked tutorial.

Ruggero_Piccoli_3-1658391376008.png

Ruggero_Piccoli_4-1658391427328.png

6 - Run a preview

Ruggero_Piccoli_5-1658391545317.png

7 - You can add a calculated fields with a summarization function the Group Band alone without its column visible. For example add a new calculated field to calculate the percentage of Babywear of the total sales

Ruggero_Piccoli_6-1658391668090.png

7.1 - Drag and drop it in the template 

Ruggero_Piccoli_7-1658391713145.png

7.2 - Run a preview

Ruggero_Piccoli_8-1658391773655.png

Third solution: like the previous one but you can add the calculated column by currency in the source QlikView document or Qlik Sense app. This will reduce the reports generation time by moving calculation on the data reload (Qlik NPrinting will not need to recalculate the new fields for every report) but needs an update of the source and of the connection cache.

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

3 Replies
Ruggero_Piccoli
Support
Support

Hi,

First solution: Create a main level by currency and nest a level with table used as data source. Then create subtotals and totals as described in https://help.qlik.com/en-US/nprinting/May2022/Content/NPrinting/PixelPerfectReports/Add-Totals-Subto.... This is simpler solution but you will have a table on generated report ordered by currency.

Secondo solution: a short tutorial. The idea is to use PixelPerfect formulas to create calculated fields with subtotals. I create a field with the summary of the product category Babywear and you can do the same by currency. Screenshots are made on the final template so you will se the results from the beginning but you have to build them.

1 - Create a Pixelperfect template and add the data source straight table as a level as usual

2 - Right click on the table and select add calculated field

Ruggero_Piccoli_0-1658390748042.png

3 - Create a calculated field with a condition to filter only data of a specific category (currency in your case)

Ruggero_Piccoli_1-1658390892435.png

4 - Drag and drop the new field in the report where you created the native table as usual

Ruggero_Piccoli_2-1658390969089.png

You can run a preview to check that calculated values are correct. It is not mandatory to add the calculated column in the final report, I added it for didactical reasons. 

5 - Add the Group Footer band where you will insert the totals. Drag and drop the calculated field and set the totals calculation by opening the summary widonw as explained in the linked tutorial.

Ruggero_Piccoli_3-1658391376008.png

Ruggero_Piccoli_4-1658391427328.png

6 - Run a preview

Ruggero_Piccoli_5-1658391545317.png

7 - You can add a calculated fields with a summarization function the Group Band alone without its column visible. For example add a new calculated field to calculate the percentage of Babywear of the total sales

Ruggero_Piccoli_6-1658391668090.png

7.1 - Drag and drop it in the template 

Ruggero_Piccoli_7-1658391713145.png

7.2 - Run a preview

Ruggero_Piccoli_8-1658391773655.png

Third solution: like the previous one but you can add the calculated column by currency in the source QlikView document or Qlik Sense app. This will reduce the reports generation time by moving calculation on the data reload (Qlik NPrinting will not need to recalculate the new fields for every report) but needs an update of the source and of the connection cache.

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.
Frank_S
Support
Support

Very nice @Ruggero_Piccoli!

Please remember hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
Ruggero_Piccoli
Support
Support

Thanks @Frank_S 🙂



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.