new to the board and have a frustrating issue blocking me from proceeding with a project. So I have a worksheet which documents times when warehouse pickers select items, and a formula that determines how long passed between picks, to monitor for excessive stops. The formula looks like this:
=IF([@[PICK TIME]]-MAXIFS([PICK TIME],[Last Picked By User (Username)],[@[Last Picked By User (Username)]],[PICK TIME],"<"&[@[PICK TIME]])>1/12,0,[@[PICK TIME]]-MAXIFS([PICK TIME],[Last Picked By User (Username)],[@[Last Picked By User (Username)]],[PICK TIME],"<"&[@[PICK TIME]]))
Now, I have a 1.6 million record Access file that feeds into Power BI, and I need to replicate this functionality in DAX. I'd like to do it all at once, but in the end I'm fine with just a column that produces the time of the previous pick for that specific picker, and a measure can do the subtraction.
How would I modify this code to prevent a circular dependency error and produce the desired result? Thanks in advance for your help, and please let me know if you need anything else!
Prev Pick =
VAR PT = 'Lucas Archive'[Date/Time]
VAR Pckr = 'Lucas Archive'[Picker]
RETURN
CALCULATE(MAX('Lucas Archive'[Date/Time]),
'Lucas Archive'[Date/Time] < PT,
'Lucas Archive'[Picker]=Pckr
)