Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
djallelsadki
Partner - Creator
Partner - Creator

complex calculation

Hello,

I have a problem described as follows:

a PivotTable I have 3 dimensions: country, year and month

and tow expressions: sum (field1) and sum (field2)

I want to get the following result

result( Dec) = sum(field1) Dec) / ( sum(field2 dec) + sum(field2 Nov) + sum (field2 Oct ) )

for example:

pour December 2012 :

result= 3185550 / ( 16158 + 17879 + 20188 ) = 58.74

pour November 2012 :

result= 3063960/ ( 17879+ 20188+ 16637) = 56

see attached file

If any one can help

I am available for any questions

with regards

D.S

1 Solution

Accepted Solutions
Not applicable

6 Replies
Not applicable

Hello . Take This.

Bye Marco

djallelsadki
Partner - Creator
Partner - Creator
Author

Hi,

Thank you

i still have a problem

the final result for january and february is null

any idea ?

Thanks

D.S

Not applicable

Becuse you don't have the record from previous data

exaple

take feb11

result( FEB11) = sum(field1) feb11) / ( sum(field2 feb11) + sum(field2 gen11) + sum (field2 dic2010 ) )

You don' t have dic2010

do you understand?

Marco

djallelsadki
Partner - Creator
Partner - Creator
Author

For your example :

the data of december 2010 exists

the problem is for all the months of January and February

01/2010, 02/2010

01/2011, 02/2011

01/2012 ,02/2012

the "above" function do not get the data from the previous period

with regards

D.S

Not applicable

take this

djallelsadki
Partner - Creator
Partner - Creator
Author

Thank you

D.S