Forum Discussion
Anonymous
3 years agoNot applicable
Previous value from one calculated column
Hi! I want to create column in power query. It is count of previous value from new column / Rate . In first cell we need to strart with 1 as previous value and then continue with privious values. ...
- Anonymous3 years ago
AlienSx Thanks for your solutions maybe I am doing someting wrong but there is still Expression.Error: A circular reference was encountered during evaluation. But this works for me :
= List.Transform(List.Skip(List.Accumulate(#"Zmenený typ1"[Rate], {1}, (s,c)=> s & {List.Last(s)/c})), Number.From)
but thanks i appreciate it
AlienSx
3 years agoSuper User
Hello, Anonymous List.Range returns you a list, not a single value. Providing that your index column starts with 1, try this instead
Def = if [Index]= 1 then 1/[Rate] else Source[Def]{[Index] - 2}/[Rate]