Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Talend Cloud AWS EU Scheduled Outage: Starting Tues 26 May 21:00 CEST with expected completion Wed 27 May 01:00 CEST
cancel
Showing results for 
Search instead for 
Did you mean: 
Aditya_Chitale
Specialist
Specialist

Dimension wise Sub total in Nprinting html

Hello All,

I have a table as given below:

Team Lead Project Walkin Booking
A XYZ 10 5
A ABC 20 6
A PQR 30 7
B LMN 40 8
B UVW 50 9
C DEF 60 10

 

I want to show subtotal grouped on basis of Team Lead.

Desired output:

Team Lead Project Walkin Booking
A XYZ 10 5
A ABC 20 6
A PQR 30 7
Total   60 18
B LMN 40 8
B UVW 50 9
Total   90 17
C DEF 60 10
Total   60 10

 

Is there any way to achieve this using html in Nprinting ?

 

Regards,

Aditya

Labels (2)
2 Solutions

Accepted Solutions
Lech_Miszkiewicz
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi @Aditya_Chitale 

Absolutely.

Smart data modeling opens up a lot of possibilities. My approach is to create dedicated dimensions  in script which would have "Total" line created during load script as one of dimension values.

those concepts are described here in general:

https://community.qlik.com/t5/Qlik-NPrinting-Discussions/Nprinting-HTML-Reports-with-Totals-and-Subt...

https://community.qlik.com/t5/Qlik-NPrinting-Discussions/How-I-can-show-SubTotals-in-NPrinting-Word-...

 

detailed concept of subtotals in straight tables is described here by @Vegar  (Thanks Vegar):

http://www.aqlik.se/2019/01/sub-totals-in-a-qlik-straight-table/

 

 

Once you have subtotals in straight table then it is up to your HTML skills to make it looking nice in NPrinting HTML report

cheers

 

cheers Lech, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful to the problem.

View solution in original post

Lech_Miszkiewicz
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi.

With only html template i cannot do anything. It is first of all Qlik Sense app in which You need to create column in table which for each row of the data will return colour you want to have. 
Then the value of colour needs to be put as inline style for cell in html table. 

I may give you a working app and template sample tomorrow

cheers Lech, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful to the problem.

View solution in original post

11 Replies
AshutoshBhumkar
Partner - Specialist
Partner - Specialist

Hello Aditya,

Can you just create a pivot table in Qlik sense and add that table an an image in HTML report.

This will work is the no. of rows are limited.

 

Lech_Miszkiewicz
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi @Aditya_Chitale 

Absolutely.

Smart data modeling opens up a lot of possibilities. My approach is to create dedicated dimensions  in script which would have "Total" line created during load script as one of dimension values.

those concepts are described here in general:

https://community.qlik.com/t5/Qlik-NPrinting-Discussions/Nprinting-HTML-Reports-with-Totals-and-Subt...

https://community.qlik.com/t5/Qlik-NPrinting-Discussions/How-I-can-show-SubTotals-in-NPrinting-Word-...

 

detailed concept of subtotals in straight tables is described here by @Vegar  (Thanks Vegar):

http://www.aqlik.se/2019/01/sub-totals-in-a-qlik-straight-table/

 

 

Once you have subtotals in straight table then it is up to your HTML skills to make it looking nice in NPrinting HTML report

cheers

 

cheers Lech, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful to the problem.
Aditya_Chitale
Specialist
Specialist
Author

Hi Ashutosh,

I tried adding it as image but it limits the number of rows displayed.

Regards,

Aditya

Aditya_Chitale
Specialist
Specialist
Author

hi @Lech_Miszkiewicz 

I tried using your method, But since I have applied set analysis expression for showing YTD and MTD measure, in current scenerio, my measure is not returning correct values. So, will I need to calculate desired measure from script part itself ?

measure expression:

NUM(count(distinct{<[DATE]= {">=$(=vYTDStartDate_SO)<=$(=vEndDate_SO)"},SOURCE={'Walk-In'},[SM ROLE]={'Sourcing','Presales'},[SM STATUS]={'Active'},[SM EMP TYPE]={'NGL','Stack','MT','Presales'},[CM ROLE]=,[CM STATUS]=,[CM EMP TYPE]=>}[OPPORTUNITY ID]),'##.0')

 

Regards,

Aditya

Lech_Miszkiewicz
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi, Hard to say without seeing all details behind your variables, data model etc..

Having set analysis in measure does not change anything in the method i have suggested so if applied correctly should work without issues.

cheers

Lech

cheers Lech, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful to the problem.
Aditya_Chitale
Specialist
Specialist
Author

Hi @Lech_Miszkiewicz 

Thanks ! It worked. Had to correct the subtotal flag field name. Just one last help needed, is it possible to highlight the subtotal row by any means in Nprinting using html ?

Regards,

Aditya

Lech_Miszkiewicz
Partner Ambassador/MVP
Partner Ambassador/MVP

absolutely. You need to be able to identify which row is a subtotal row by adding extra flags or even css syntax directly to Qlik table

Concept is described here:

cheers

cheers Lech, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful to the problem.
Aditya_Chitale
Specialist
Specialist
Author

Hello @Lech_Miszkiewicz ,

Sorry for the late response, I tried the methods that you mentioned in provided links. But I am unable to highlight the subtotals row in html. I am able to do so in Qlik Sense. Kindly help in achieving the same in html too.

I have attached my html template.

 

Regards,

Aditya

Lech_Miszkiewicz
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi.

With only html template i cannot do anything. It is first of all Qlik Sense app in which You need to create column in table which for each row of the data will return colour you want to have. 
Then the value of colour needs to be put as inline style for cell in html table. 

I may give you a working app and template sample tomorrow

cheers Lech, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful to the problem.