Forum Discussion
BB9
4 years agoFrequent Visitor
DAX expression help
Hi, I am trying to generate a new column based on two other columns, and not able to get this to work. Item1 1/1/21 8 Item1 1/1/21 8 Item1 1/1/21 8 Item1 1/2/21 ...
- 4 years ago
BB9 , first you need to add an index in the power query.
Then a new column
new column =
var _min = minx(filter(Table, [item] = earlier([item]) && [date] = earlier([date])),[Index])
var _avg = minx(filter(Table, [item] = earlier([item]) && [date] = earlier([date])),[value])
return
if([Index] =_min, _avg, blank())
BB9
4 years agoFrequent Visitor
Thank you amitchandak for the quick response. It worked like a gem!