Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
hi all
in my model i have a table with list of stores , period_id as from and max_period_id as to
i want to add rows to each store in the list and add +1 to period_id i.e
store name | period_id | max_period_id | |
Store A | 21 | 26 | exist |
Store A | 22 | 26 | need to be added |
Store A | 23 | 26 | need to be added |
Store A | 24 | 26 | need to be added |
Store A | 25 | 26 | need to be added |
Store A | 26 | 26 | need to be added |
tried it with :
from + IterNo() - 1 as new_period
while from + IterNo() - 1 <= to
but did not succeed ..
any ideas
advanced thanks
Seems to work for me
Table:
LOAD [Store Name],
from + IterNo() - 1 as new_period
While from + IterNo() - 1 <= to;
LOAD * INLINE [
Store Name, from, to
Store A, 21, 26
];
Can you provide sample input data with expected output?
Seems to work for me
Table:
LOAD [Store Name],
from + IterNo() - 1 as new_period
While from + IterNo() - 1 <= to;
LOAD * INLINE [
Store Name, from, to
Store A, 21, 26
];
you are right. it was a number formatting issue.
thank you