Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Not applicable

Calc of % in Dimension

Hi everyone.

I have a script in my model that should calculate the "%" = "Debt1/Debt Total" and this  "%" should be included as a dimension next to "Debt1" and "Debt Total", but I can't make that the code realice the division. Please, could you help me?

Attached is the example model with the script.


5 Replies

Re: Calc of % in Dimension

I am not exactly sure what you are looking for... Would you be able to point out where exactly are we looking?



Not applicable

Re: Calc of % in Dimension

I need that table in Page "Weekly AR by Area" (my example model is attached in main message) does the correct calculation of %over 14 and %over 180.

Taking Chile as example, now I have this:

and I should have this (can you see the error in %over 14 and %over 180?:


Account ReceivableCHILECHILE4,7574,7574,7574,7574,757
Account ReceivableGrand Total 4,7574,7574,7574,7574,757
Over 14 DaysCHILECHILE4,3654,3654,3654,3654,365
Over 14 DaysGrand Total 4,3654,3654,3654,3654,365
Over 180 DaysCHILECHILE1,2711,2711,2711,2711,271
Over 180 DaysGrand Total 1,2711,2711,2711,2711,271
%Over 14 DaysCHILECHILE91.7591.7591.7591.7591.75
%Over 14 DaysGrand Total 91.7591.7591.7591.7591.75
%Over 180 DaysCHILECHILE26.7226.7226.7226.7226.72
%Over 180 DaysGrand Total 2727272727
Not applicable

Re: Calc of % in Dimension

The calculations of % are OK, but the problem occurs when I drill up into the dimensions because at customer level the % is OK, but when I check by country the % of country is the sum of % of customer and should by a calculation not sum...

Re: Calc of % in Dimension

How are you getting this 91.75 number? and 26.72? I am trying to understand the logic behind this.... Are you looking for a change in the script or on the front end? or are you looking to apply a totally new approach? I guess I am still trying to figure out your requirement

Not applicable

Re: Calc of % in Dimension

Do you review my script?, in the tab "Tabla1" is the calculation of every "variable". The calculation at bottom level is OK, my problem is when aggregate the Variable dimension, because most of your values are summarized but I have these 2 "variable": "% over 14" and "% over 180" which aggregate calculation is not sum(), these should be apply the formula of the script for their aggregation.

Am I clear?

Attached in the mail mesage is my example model with script included.

thanks !