Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello experts I need your help with creating an NPrinting pivot table. Below is the code I have so far which gives me a straight table but I need it to be a pivot table.
<!DOCTYPE html>
<html>
<head>
<style>
table, td,th {
border: 1px solid black;
}
</style>
</head>
<body>
<table>
<tr>
<th>Quarter</th>
<th>Position</th>
<th>Goal This Q</th>
<th>Apps This Q</th>
<th>Goal Met This Q</th>
<th>2020 Goal</th>
<th>2020 Apps for SMP</th>
<th>Percentage Goal Met</th>
<th>Number Accepted 2020</th>
<th>Accepted Percentage</th>
</tr>
<tr>
<td>%%Quarter%%</td>
<td>%%=[Role Group]%%</td>
<td>%%Sum({_Quarter={"$(vQuarter)"}_} Goals)%%</td>
<td>%%=COUNT({_Goals={"_0"},Year={'2020'},Quarter={"$(vQuarter)"}_}[Applicant ID])%%</td>
<td>%%Count({$_Goals={"_0"}, Year={'2020'}, Quarter={"$(vQuarter)"}_}[Applicant ID]) / Sum({$_[Applicant Submit Date]=,Quarter={"$(vQuarter)"}_} [Goals])%%</td>
<td>%%if($(vApplicationCount) _ 0 or $(vApplicationGoals) _0,Sum({$_[Applicant Submit Date]=,Year=, [Quarter]=_} [Goals]))%%</td>
<td>%%Count({$_Goals={"_0"},Year={'2020'},Quarter=_}[Applicant ID])%%</td>
<td>%%Count({$_Goals={"_0"},Year={'2020'},Quarter=_}[Applicant ID]) / if($(vApplicationCount) _ 0 or $(vApplicationGoals) _0,Sum({$_[Applicant Submit Date]=,Year=, [Quarter]=_} [Goals]))%% </td>
<td>%%Count({_[Current Status ID]={2}_}[Applicant ID])%%</td>
<td>%%Count({_[Current Status]={'Accepted'}_}[Applicant ID])/Count({$_Goals={"_0"},Year={'2020'},Quarter=_}[Applicant ID])%%</td>
</tr>
</table>
</body>
</html>
The output is a straight table which looks like this
But I need a pivot table . Any suggestions will be appreciated.
Pivot tables in HTML are not easy to build and whole code (in my opinion) must come from Qlik application directly
Example here: https://nprintingadventures.com/2020/04/24/how-to-build-html-pivot-table-in-nprinting/
btw... there is no one piece of code we can give you - it will be purely based on requirements so you may want to share mockup of final outcome identifying what is dynamic (number of grouped dimensions in rows and columns etc...)