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: 
gerald_lebret
Partner - Creator
Partner - Creator

running total from qlik sense tables

Hi,

I have created an object in Qlik Sense with monthly running totals.

I then created a pixel perfect report where I add my table in a level.

I now have 2 problems:

1. the values shown are the values of each months and not the running totals, thus I have to format a sumreport to get the correct values

2. I have a column which calculate the difference in percentage (Year N - Year N-1)/Year-1 And it does not work.

For instance, in february, I wanted ((January N + february N )- (January N-1+february N-1)/(January N-1+february N-1).

I only get (for february) (February N-february N-1) / February N-1.

Can anyone help please?

Thanks

Labels (1)
9 Replies
Lech_Miszkiewicz
Partner Ambassador/MVP
Partner Ambassador/MVP

Levels work the same as selections in Qlik Sense. So every possible combination of values in level Nprinting applies selection and exports data from your app. 
This means that you have to work around your running total expression to factor for this. Just make sure that your running total works when you select for example single month in your table. 


Normally I suggest simply to model this by creating respective rolling grouping dimension or use set analysis if possible. The choice is yours. Set Analysis in those instances can be challenging.

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.
gerald_lebret
Partner - Creator
Partner - Creator
Author

Hello @Lech_Miszkiewicz ,

Thanks for your answer.

However, I am wondering why my running totals are not taken as such in Nprinting.

Here is the formula I use to calculate one of my running totals in Qlik Sense:

rangesum(
above(total( Sum({$ < [DOC.Type_document_groupe_code]={$(vOPFactures)},
Annee_fiscale ={$(vAnneeN)},
Mois={"=Mois<=max(Mois)"},
[LIG.Type_de_ligne]={$(vTypeDeLigne)}
>} [LIG.Montant_HT_devise_succursale]
)
-
Sum({$ < [DOC.Type_document_groupe_code]={$(vOPNotesCredit)},
Annee_fiscale ={$(vAnneeN)},
Mois={"=Mois<=max(Mois)"},
[LIG.Type_de_ligne]={$(vTypeDeLigne)}
>} [LIG.Montant_HT_devise_succursale]
)
-
Sum({$ < Annee_fiscale ={$(vAnneeN)},
Mois={"=Mois<=max(Mois)"},
[LIG.Type_de_ligne]={$(vTypeDeLigne)},
[LIG.Cle_article]={'60002','60008'}
>} [LIG.Montant_HT_devise_succursale]
)
),0,RowNo(total)
)
)

---------------------------

If I do the job in Qlik Sense (which works like a charm, why do I have to basically do it again by specifying that I want a running total on each of my columns?

 

Furthermore, I still have the issue with the variance % (revenue difference between y and y-1 divided by revenue y-1)

 

Thanks.

 

gerald_lebret
Partner - Creator
Partner - Creator
Author

@Lech_Miszkiewicz could it come from the fact that I use master measures?

Lech_Miszkiewicz
Partner Ambassador/MVP
Partner Ambassador/MVP

Yes and No 🙂

It depends - Using Master Measures may cause measures not coming through all together - this may be indeed the problem where your difference % does not work. However what you described with running total is different thing . 

When you go to your Qlik Sense app and you select single month - does your running total show correct numbers?

  • If Yes - then we would need to understand exactly how you have built your NPrinting report
  • If No - then you have an answer proving what i tried to explain in my previous comment. 

This is very common thing with NPrinting and I learned it by experiencing exactly the same results as you do which is why I am fairly confident that the way you built your running total may not 100% work in NPrinting.

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.
gerald_lebret
Partner - Creator
Partner - Creator
Author

OK... I did re create my table without using any master measure. My result is the same.

In my qlik sense app, it is working as expected when I select a single month, my running totals equal my totals.

Here is a printscreen of my pixel perfect template:

gerald_lebret_0-1680264298853.png

It is quite simple as you can see. On the left side, I have my sales per month and on the right side, my running totals.

As mentionned before, I did create the whole tables with all my running totals in Qlik Sense (including the difference in %) and it works perfectly.

But in Nprinting, I had to go on each cell of the table to specify it's a running total. And now, I cannot have the difference in % working as expected.

Do you need anything else to help me out?

 

Thanks

Lech_Miszkiewicz
Partner Ambassador/MVP
Partner Ambassador/MVP

Something is not right here. I dont know if you have actually shared real screenshot or some dummy but:

  1. the id's on all columns look identical - which would be impossible to achieve if they were normally created (unless you created master items using GinQI extension or similar) Lech_Miszkiewicz_0-1680513192497.png

     

  2. I made a test with the layout you have and it all worked for me as expected.

I dont know what else I can suggest. With this layout it all works for me well and I dont have any issues. 

One more thing - Is your Qlik Sense version supported with this NPrinting version? Since you are using NPrinting May 2021 supported Qlik Sense versions are: https://help.qlik.com/en-US/nprinting/May2021/Content/NPrinting/DeployingQVNprinting/System-requirem...

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.
gerald_lebret
Partner - Creator
Partner - Creator
Author

Hello @Lech_Miszkiewicz ,

It was a real printscreen.

I only use standard Qlik Sense features and the ID's are not identical:

gerald_lebret_0-1680521902508.png

However, since I never really received a proper Nprinting training, if you have a way to rename the names for fields, level... I'll be more than happy to read it.

 

As for the prerequisites, yes it's all good. I use Qlik Sense february 2023 with Nprinting may 2022 SR4.

Thanks for your help

Gerald

 

Lech_Miszkiewicz
Partner Ambassador/MVP
Partner Ambassador/MVP

Ohh ok. Cause you choose label “nprinting may 2021 sr4” and now you are saying it is “nprinting may 2022 sr4” which is why i wanted to double check. 

447B1418-B77C-4A48-B60A-E7442923CAC9.jpeg

so which is it? Just double check and make sure it is supported configuration!

 

 

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.
gerald_lebret
Partner - Creator
Partner - Creator
Author

It is a mistake when I created the post. It is NP May 2022 SR4 with QS February 2023