Confused about Lag, Lead, Post, Offset


I got confused between these functions. 

It's unclear for me now. If any one can help me with simplifying this it would be very helpful for me. 


Is there use cases where Lag and Lead should be used instead of offset or post?



Thanks in advance. 

Best Answers

  • jagadishdash

    The LEAD and LAG functions allow you to specify how non-positive values should be treated - you would use these formulas if you wanted to return a different result for negative/zero values.   OFFSET is essentially a simplified version of the LEAD formula, as it will return the value of the period specific regardless of whether that cell value is positive, negative or zero (i.e. NONSTRICT).  So in other words, they all do something similar with slightly different behaviors/conditions.


    POST will allow for more than one source item to map to a specified target.  This formula should only be used in circumstances where more than one value can apply, anytime you are trying to return a single value from a specified number of periods in the past/future the other time related formulas (Offset, Lag, etc.) will operate more efficiently. See below for a bit more detail on POST: 



    @bb21 Hope your confusion cleared. 



    Jagadish Dash

  • bb21
    Answer ✓

    Such a great explanation. 

    Thank you so much @jagadishdash .