2 Replies Latest reply on Jun 18, 2013 10:57 AM by Monika Plewa

# display window_max row

I have a table with couple of measures displayed for the past 55 weeks. My goal is to only show values for current week, plus 3-6-9-12 months ago AND max row. I can get the specific weeks to display as an offset from first, but can't get the max row to show up as well.

if first() = 0 then 'T'

elseif first() = -12 then 'T'

elseif first() = -25 then 'T'

elseif first() = -38 then 'T'

elseif first() = -51 then 'T'

elseif window_max(sum([Sales])) is true then 'T'    --- that's what I can't get to work

else 'F'

end

I then drop this on my filters shelf and select true, while computing along Table (down) - my weeks are on the rows shelf.

Is this possible?

Thanks

• ###### 1. Re: display window_max row

Try:

if first() = 0 then 'T'

elseif first() = -12 then 'T'

elseif first() = -25 then 'T'

elseif first() = -38 then 'T'

elseif first() = -51 then 'T'

elseif (sum([Sales]))=window_max(sum([Sales])) then 'T'

else 'F'

end

I would use the advance compute to explicitly set what is first() and the sort order rather than relying on table down

• ###### 2. Re: display window_max row

Thanks Alex! That worked.