Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Dear experts,
I am quite new to Qlikview and need help of experienced users about my below issue.
I have a table like that
Item | File | Year | Quarter | Amount |
A | 100 | 2012 | 1 | 50 |
B | 101 | 2012 | 1 | 100 |
A | 102 | 2012 | 2 | 60 |
B | 103 | 2012 | 2 | 250 |
A | 104 | 2012 | 3 | 55 |
B | 105 | 2012 | 3 | 300 |
A | 106 | 2012 | 4 | 65 |
B | 107 | 2012 | 4 | 400 |
And I want to calculate the total result with cumulative sums of item A values and incremental value of Item B as per and of quarter of the year.
Year | 2012 | 2012 | 2012 | 2012 |
---|---|---|---|---|
Quarter | 1 | 2 | 3 | 4 |
Item A | 50 | 60 | 55 | 65 |
Item B | 100 | 250 | 300 | 400 |
Result | 150 | 410 | 705 | 1115 |
Formula | Value of 2012 A1 + sum(B1+B2) | Value of A2 + sum(B1+B2+B3) | Value of A3 + sum(B1+B2+B3+B4) | Value of A4 + sum(B1+B2+B3+B4) |
I am fine with solutions working over both in load script or as expression. Can someone help me out on this one?
Thank you very much in advance!
Hi egemenekinci, further if you get the time then try to implement what sunny has suggested and if you find it more easy and efficient then you can any time mark his answer correct and mine as helpful.
I agree its not complicated, but joins can sometime be painfully slow. So my question is, do we think that Joins are better than using Set Analysis?
If joins are not performed on large data set & also joins are not performed combined key then join is always efficient as it brings all the relevant dimensions & measures into single table, but at the same time it increases the application size as underlying symbol table size increases. So that all depends on amount of data and requirement.
I have working with a data around 500K records and actually your solution through join is not so effective... stalwar1,'s solution works more quicker as expected.
egemenekinci you can also mark my answer as helpful if so