Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have the attached Straight table.
Dimensions = trade_dt and period_cd_my
Expression = Sum(pos_lots)
Is there a way to show the sum of the position lots where the trade_dt is less than or equal to the dimension trade_dt?
ie Sum({<trade_dt={'<=trade_dt'}>}pos_lots)
Any help will be much appreicated.
Regards,
Daniel
What do you mean by "where the trade_dt is less than or equal to the dimension trade_dt?" do you mean, where the dimension trade_dt is less than or equal to the summation of all trade_dt's for one period_cd_my?
did not understand this line "where the trade_dt is less than or equal to the dimension trade_dt"
Hi Richard,
Thank you for the reply.
I believe I do mean where the dimension trade_dt is less than or equal to the summation of all trade_dt's for one period_cd_my.
Regards,
Daniel
Hi, can you upload an example that the result of the table you are find?
Hi Pablo,
Attached is some test data.
The column in red is what I am trying to produce. This is the sum total of all the days data less than the trade_dt in that row.
I hope this makes sense.
Regards,
Daniel
see this
Data:
LOAD ProductName,
trade_dt,
period_cd_my,
[Sum(pos_lots)] as pos_lots
FROM
(
New:
NoConcatenate
LOAD *,
if(period_cd_my=Previous(period_cd_my),RangeSum(peek('Output'),pos_lots),pos_lots) as Output
Resident Data
Order by ProductName,period_cd_my,trade_dt;
DROP Table Data;
!Hi, i atached an .qvw
Thanks for your response Kushal.
Is it possible to write this as an expression within the straight table?
Regards,
Daniel
i think pablo.ortiz already answered