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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

How to calculate sum of last two months in script

Hi,

If I have one more dimension (employee), how to calculate sum of two last month for each employee?

Tab:

LOAD * Inline [

Data , Month, Employee

2, 1, a

2, 1,b

4, 2,a

5, 2,c

1, 3,a

2, 4,b

];


Thanks,

Tu Nguyen

13 Replies
antoniotiman
Master III
Master III

Table loaded already sorted.

However, in my script Order By of large table (> 30M rows) lasts 10/15 minutes.

Anonymous
Not applicable
Author

Dear Antonio,

Thank you so much.

And kindly need your help on my problem in case having 1 more dimension.

Data:

Load * Inline [

date, sales, outlet

1/1/2017, 1, a

2/1/2017, 1, a

4/1/2017, 0, a

5/1/2017, 0, a

7/1/2017, 1, a

9/1/2017, 1, a

10/1/2017, 1, a

1/1/2017, 0, b

2/1/2017, 1, b

3/1/2017, 1, b

4/1/2017, 1, b

5/1/2017, 0, b

6/1/2017, 0, b

3/1/2017, 0, c

4/1/2017, 1, c

5/1/2017, 1, c

6/1/2017, 0, c

7/1/2017, 0, c

];

antoniotiman
Master III
Master III

I don't understabd Your request,

Which is Your expected result ?

Anonymous
Not applicable
Author

Thank you. I found solution, I run inline for every current date.

Thank you so much.