Forum Discussion
ase
4 years agoFrequent Visitor
Creating a new column which takes values from another column for previous period
Hi all, I still have a problem creating a column/measure which takes the value from another column but for the next period. Below is an illustration of the issue: I tried to creat...
- 4 years ago
Hi ase
Assumening the Month column is a sequential number then you may tryNew Inventory Column = VAR CurrentMonth = TableName[Month] VAR CurrentProductTable = CALCULATETABLE ( TableName, ALLEXCEPT ( TableName, TableName[Product] ) ) VAR NextMonthTable = FILTER ( CurrentProductTable, TableName[Month] = CurrentMonth + 1 ) RETURN MAXX ( NextMonthTable, TableName[Inventory] )
tamerj1
Community Champion
4 years agoHi ase
Assumening the Month column is a sequential number then you may try
New Inventory Column =
VAR CurrentMonth = TableName[Month]
VAR CurrentProductTable =
CALCULATETABLE ( TableName, ALLEXCEPT ( TableName, TableName[Product] ) )
VAR NextMonthTable =
FILTER ( CurrentProductTable, TableName[Month] = CurrentMonth + 1 )
RETURN
MAXX ( NextMonthTable, TableName[Inventory] )ase
4 years agoFrequent Visitor
It worked! Thank you so much for the straight-forward and easy to follow solution!