Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hey Community,
I want to create a pivot table in nprinting , which should look this
2023-2024 |
2022-2023 |
|
||||
Month |
A |
B |
A |
B |
Growth A |
Growth B |
Jan |
1000 |
100 |
500 |
50 |
-498 |
-48 |
Feb |
2000 |
200 |
1000 |
100 |
-998 |
-98 |
Mar |
3000 |
300 |
1500 |
150 |
-1498 |
-148 |
GrandTotal |
6000 |
400 |
3000 |
300 |
-2994 |
-294 |
I am able to achieve this
2023-2024 |
2022-2023 |
|||
Month |
A |
B |
A |
B |
Jan |
1000 |
100 |
500 |
50 |
Feb |
2000 |
200 |
1000 |
100 |
Mar |
3000 |
300 |
1500 |
150 |
GrandTotal |
6000 |
400 |
3000 |
300 |
But when I add the Growth A and Growth B columns it repeats itself for both year like this, which I dont want.
2023-2024 |
2022-2023 |
|||||||
Month |
A |
B |
Growth A |
Growth B |
A |
B |
Growth A |
Growth B |
Jan |
1000 |
100 |
0 |
0 |
500 |
50 |
0 |
0 |
Feb |
2000 |
200 |
0 |
0 |
1000 |
100 |
0 |
0 |
Mar |
3000 |
300 |
0 |
0 |
1500 |
150 |
0 |
0 |
GrandTotal |
6000 |
400 |
0 |
0 |
3000 |
300 |
0 |
0 |
Fields Month, Year, A, B, Growth A, Growth B are in present in the straight table in my qliksense app.
In the Straight table Month and Year are Dimensions
A, B, Growth A and Growth B are Measures
A: Sum(A)
B: Sum(B)
Growth A: ( Sum(A for Current Year) - Sum(A for Previous Year) ) / Sum(A for Previous Year)
Growth B: ( Sum(B for Current Year) - Sum(B for Previous Year) ) / Sum(B for Previous Year)
Thanks in Advance.
Hi,
Which version of NPrinting out of 3 different ones are you using? Obviously you cannot use all of them at the same time! Please correct labels to keep it only to version in use.
You will not be able to achieve this using pivot table. The nature of pivot table is that it repeats measures for each dimension value hence to me it does exactly what it should do.
For such scenario like yours I always use straight table with set analysis for years columns and growth as a separate measure. At the end using straight table and separate measures for current year and last year gives you a lot more freedom in NPrinting allowing you to build nicely formatted report. Bottom line is the planning and built of object needs to be done in Qlik Sense and measures can be easily achieved with parameterized variables and smart data modeling. Once you have such table created in Qlik Sense then just follow steps from https://help.qlik.com on how to build nprinting excel table using individual columns.
cheers