Showing results for 
Search instead for 
Did you mean: 
jwik2 Regular Visitor
Regular Visitor

Lag Function

I have a matrix and ideally I would like to create a lag column. What I mean by this is that for the first column the values  would be 

201403 - 

201404 - 26

201405 - 358

and so on. Is this possible?


Super User
Super User

Re: Lag Function

Example source data please or is that your source data? Please see this post regarding How to Get Your Question Answered Quickly:


In general, you will probably need a VAR that leverages CALCULATETABLE, GROUPBY or SUMMARIZE. You would then need to ADDCOLUMN using EARLIER. See my article on EARLIER. See my article on Mean Time Before Failure (MTBF) which uses EARLIER:

Did I answer your question? Mark my post as a solution!

Proud to be a Datanaut!