Qlik Community

QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

djallelsadki
Contributor

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

Re: complex calculation

take this

6 Replies
Not applicable

Re: complex calculation

Hello . Take This.

Bye Marco

djallelsadki
Contributor

Re: complex calculation

Hi,

Thank you

i still have a problem

the final result for january and february is null

any idea ?

Thanks

D.S

Not applicable

Re: complex calculation

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
Contributor

Re: complex calculation

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

Re: complex calculation

take this

djallelsadki
Contributor

Re: complex calculation

Thank you

D.S

Community Browser