Forum Discussion
Drors
8 years agoResolver III
Duplicate rows with new values
Hi, I have a table like that : Customer|Date|amount I need to duplicate each row 12 times each time with the next month example: original row customer | Date | amount 1 ...
- 8 years ago
Hi Drors
Try this solution
Go to Modelling Tab>>> New Table
New Table = GENERATE ( TableName, VAR mymonth = MONTH ( TableName[Date] ) RETURN GENERATESERIES ( 0, 11, 1 ) )Now Add this CALCULATED COLUMN to your NEW TABLE
New date = DATE ( YEAR ( 'New Table'[Date] ), MONTH ( 'New Table'[Date] ) + 'New Table'[Value], DAY ( 'New Table'[Date] ) )
Zubair_Muhammad
8 years agoCommunity Champion
Hi Drors
Try this solution
Go to Modelling Tab>>> New Table
New Table =
GENERATE (
TableName,
VAR mymonth = MONTH ( TableName[Date] ) RETURN GENERATESERIES ( 0, 11, 1 )
)Now Add this CALCULATED COLUMN to your NEW TABLE
New date = DATE ( YEAR ( 'New Table'[Date] ), MONTH ( 'New Table'[Date] ) + 'New Table'[Value], DAY ( 'New Table'[Date] ) )
Anonymous
4 years agoNot applicable
how about if i need it dublicated until todays month? i dont need it dublicated only 11 times!
thanks,