Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I want the data in a Cumulative way like
My Data starts by Jan 2021, if I select the Jan 2021, I want to see that month data and If i select Feb 2021 then I want to see the cumulative data of Jan and Feb, If i select the March 2021 then I want to see the Jan, Feb, March 2021 data Cumulative.
Result I want like this
Thanks in Advance.
Hi,
By using rangesum and peek function you can achieve the required output.
Use the below script for your desired output
EMP:
LOAD * INLINE [
ID,Name,Order_Date,Sales
1,Satish,1/2/2021,100
2,Ravi,2/3/2021,120
3,Kiran,3/4/2021,130
4,Chandra,4/5/2021,140
5,Satish,5/6/2021,150
];
New:
Load
ID,
Sales,
Name,
"Order_Date",
Rangesum(Sales, Peek(CumulativeSales)) as CumulativeSales
Resident [EMP]
order by "Order_Date";
Drop table EMP;
exit Script;
Regards,
SK
Hi,
By using rangesum and peek function you can achieve the required output.
Use the below script for your desired output
EMP:
LOAD * INLINE [
ID,Name,Order_Date,Sales
1,Satish,1/2/2021,100
2,Ravi,2/3/2021,120
3,Kiran,3/4/2021,130
4,Chandra,4/5/2021,140
5,Satish,5/6/2021,150
];
New:
Load
ID,
Sales,
Name,
"Order_Date",
Rangesum(Sales, Peek(CumulativeSales)) as CumulativeSales
Resident [EMP]
order by "Order_Date";
Drop table EMP;
exit Script;
Regards,
SK
Hi Saurabh,
Thanks for the solution.
If I want to make this in Frontend only, then is it possible through Set analysis?
If it is possible please let me know how can we do that.
Thanks in Advance.