
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Rangesum with Peek function
I want to capture the total number of orders per day. I have tried with the below script but I couldn't able to achieve it. Could anyone of us help me to fix this?
Table1:
Load * Inline
[
Date,Number of Orders/Returns
2019-01-01,100
2019-01-02,25
2019-01-02,-30
2019-01-03,10
2019-01-03,-15
2019-01-04,20
2019-01-04,-10
];
NoConcatenate
Test:
Load
Date,[Number of Orders/Returns],
RangeSum([Number of Orders/Returns],Peek(Orders)) as TotalOrders
Resident Table1
Order by Date;
drop table Table1;
exit Script;

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@arusiva89 are you looking for ?
Table1:
Load * Inline
[
Date,Number of Orders/Returns
2019-01-01,100
2019-01-02,25
2019-01-02,-30
2019-01-03,10
2019-01-03,-15
2019-01-04,20
2019-01-04,-10
];
output:
load Date,count([Number of Orders/Returns]) as TotalOrders resident Table1 group by Date;
drop table Table1;
output:
Taoufiq ZARRA
"Please LIKE posts and "Accept as Solution" if the provided solution is helpful "
(you can mark up to 3 "solutions") 😉

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi what you need is cumulative sales in script. Find some useful links.
https://community.qlik.com/t5/QlikView-Scripting/Running-Sum-on-Load-Script/td-p/536661
https://community.qlik.com/t5/New-to-Qlik-Sense/Running-total-per-dimension/td-p/1542119

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
`No,I want to sum the number of orders per day

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@arusiva89 why don't you simply use sum( Number of Orders/Returns) as expression?
