Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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
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:
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
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
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.
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:
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
Hi Ashutosh,
I tried adding it as image but it limits the number of rows displayed.
Regards,
Aditya
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
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
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
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
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
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