Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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;
@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:
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
`No,I want to sum the number of orders per day
@arusiva89 why don't you simply use sum( Number of Orders/Returns) as expression?