Forum Discussion
cmilligan262
6 years agoHelper II
Prior month Value Calculated Column
I need to get movement in our roster and need to pull in the prior months cost center name in a calculcated column This is what my data looks like Date EMPID ...
- 6 years ago
Perhaps:
Column = VAR __PreviousDate = MAXX(FILTER('Table',[Date]<EARLIER([Date])&&[EMPID]=EARLIER([EMPID])),[Date]) RETURN MAXX(FILTER('Table',[EMPID]=EARLIER([EMPID]) && [Date]=__PreviousDate),[Cost Center Name])
Greg_Deckler
6 years agoCommunity Champion
Perhaps:
Column =
VAR __PreviousDate = MAXX(FILTER('Table',[Date]<EARLIER([Date])&&[EMPID]=EARLIER([EMPID])),[Date])
RETURN
MAXX(FILTER('Table',[EMPID]=EARLIER([EMPID]) && [Date]=__PreviousDate),[Cost Center Name])
- cmilligan2626 years agoHelper II
Thank you Greg_Deckler that worked.
Do you have any explanation on why that would work and why I was getting a circular dependecy error on the formula I tried
- Greg_Deckler6 years agoCommunity Champion
I believe the short answer is that you were using CACULATE in a column formula along with DISTINCT or VALUES and that tends to be bad. edhans probably has a much deeper and more insightful explanation as I have seen a really great explanation in a separate thread. edhans would highly recommend making that a blog article.