2 Replies Latest reply on Dec 29, 2018 1:57 PM by jon rios

# Create row level calculation using previous value

i currently have a calc that creates a label based on a comparision between current value and previous value...i created a calc: previous value = Lookup(MIN( [value] ) ,-1)

then in seperate calc i created: higher lower = if [value] >= [previous value] then 1, else 0 end.  but this produces an aggregtion because of the table calc in first calc.

i was interested in a row level calculation that takes the row level value and looks to previous value then applies a label. so at the data source table you would see these labels for each row...there is a specific order to the data (date/time)

i am struggling creating this "previous value" comparison at the row level... can anyone assist?  thanks

• ###### 1. Re: Create row level calculation using previous value

Hi Jon,

Not sure if I understand your challenge but find my approach as reference below and stored in attached workbook version 10.5 located in the original thread.

1. M1. Lookup: lookup(min([Value]),-1)

2. M2. 1 or 0: if sum([Value]) >= [M1. Lookup] then 1 else 0 end

3. Drag the required objects to the indicated locations and show filter

Hope it helps,

Regards,

Norbert

• ###### 2. Re: Create row level calculation using previous value

thanks Norbert, i did the same calculations in my example in my first post...

if you look at the data source tab, you  will see there is not a row level calculation , because of the table calculation (LOOKUP) it is an aggregate...

i want a row level calculation not an aggregation... is there anyway to write this as a row level calculation and not as an aggregate (table calc)?