Forum Discussion
Rigoleto
8 years agoHelper II
get value from Previous row
Need a funtion or logic to read a previous row, for instance: How can you see Do I need is to sum up the previos record and build a new column with those values Ap...
- 8 years ago
I think this calculated column would work.
See the attached sample file as well
Calculated Column = VAR PreviousRow = TOPN ( 1, FILTER ( Table1, Table1[Month] < EARLIER ( Table1[Month] ) && Table1[Employee] = EARLIER ( Table1[Employee] ) ), [Month], DESC ) VAR PreviousValue = MINX ( PreviousRow, [Sales] ) RETURN Table1[Sales] + PreviousValue
Ashish_Mathur
8 years agoSuper User
Hi,
Do youw want that as a measure or as a calculated column formula?
- Rigoleto8 years agoHelper II
Hi,
I would like as calculated column, please advise me about the logic , also include as measure if you can
- Ashish_Mathur8 years agoSuper User
Hi,
In what order should the numbers appear in column B? Should they be in descending order?
- Rigoleto8 years agoHelper II
Basically Do I need to do or get from the logic is something like this
Notice in the screeshot that I have 3 employees, every single employee has sales by month and the sum of sales is doing for every employee, no mixed up with a previous employee, that is the logic that I need in order to calculate the Sumed column
Thanks in advance for your help!!!