Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have a table in the below structure and I want to generate one more column from the below that satisfying the below condition
The name of the column is called Dividend_paid since 01/01/2016.
The rule is to search For the same ASX code and add up last column(Dividend_Paid) if the date is between 01/01/2016 and the corresponding value in Date column. I think something loop will do the job, but not exactly how. thanks
I wonder, why loop helps here. Some where try this?
If([ASX code] = Previous([ASX code]) and (Date >= MakeDate(2016,01,01) and Date <= Previous(Date)),'Flag1', 'Flag2') as Dividend_Paid
I wonder, why loop helps here. Some where try this?
If([ASX code] = Previous([ASX code]) and (Date >= MakeDate(2016,01,01) and Date <= Previous(Date)),'Flag1', 'Flag2') as Dividend_Paid
try this
Load *,
IF([ASX Code] = Previous([ASX Code]) And Date >= MakeDate(2016,1,1) And Date <= Previous(Date),Dividend_Paid + Previous(Dividend_Paid) As Dividend_Paid
From <TableName>
Order by [ASX Code]