Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Discover how organizations are unlocking new revenue streams: Watch here
cancel
Showing results for 
Search instead for 
Did you mean: 
sunilkumarqv
Specialist II
Specialist II

formulae need to calculate the Expression

Hi all,

I want to get result output column using some auto generate formulae in Expression  object.

Inline * load

[A,Output

A1,A1/1

A2,(A1+A2/2

A3,(A1+A2+A3)/3

A4,(A2+A3+A4)/3

A5,(A3+A4+A4)/3

nd so on...

];

Help out of this ...

4 Replies
Not applicable

Hi Sunil,

How many different combinations will you get?

if its just a few then you can simply do this:

TEMP:

[A,Output

A1,A1/1

A2,(A1+A2/2

A3,(A1+A2+A3)/3

A4,(A2+A3+A4)/3

A5,(A3+A4+A4)/3

nd so on...

];

DATA:

NOCONCATENATE

LOAD

     if(A = 'A1', (A1) / 1, if(A = 'A2', (A1 + A2) / 2, if(A = 'A3', (A1 + A2 + A3) / 3))) etc etc.

RESIDENT TEMP;

DROP TABLE TEMP;


Regards,
Marius

tresesco
MVP
MVP

Give some more lines of expected output, so that a rule could be formed(generalize).

sunilkumarqv
Specialist II
Specialist II
Author

Hi tresesco,

Inline * load

[A,Output

A1,A1/1

A2,(A1+A2/2

A3,(A1+A2+A3)/3

A4,(A2+A3+A4)/3

A5,(A3+A4+A5)/3

];

With same as above

Inline * load[

A,Outut

1,

12

13,

15,

16,

];

give me output of A expression .

sunilkumarqv
Specialist II
Specialist II
Author

Hi maricus,

This is not fair idea to do.Need auto generated formulate to get same.