Getting value from date before this row

I am currently building a cash balance application. I am using a valid count from a previous day to use in a referenced table for calculation. This works fine with this:

ANY(
SELECT(
Cash Tally[Total],
AND(
([Total] > 0),
([Date] < [_ThisRow].[Date]),
([Location] = [_ThisRow].[Location])),
FALSE
)
)

But, if i go to add a new reference from an older date, it does not update values by date, only by row number it seems.

How can I have the value referenced be the most recent?

Solved Solved
1 13 481
1 ACCEPTED SOLUTION

I seem to have acheived the desired sort goal with MAXROW()

MAXROW("Cash Tally", "Date", (AND([Date]<[_THISROW].[Date],[Location]=[_THISROW].[Location])))

and then another VC to extract the value i need:

[Maxrow cashtally].[Total]

Currently works!

 

EDIT: I should add that I realize my explanation of the goal may not have been the best. Thanks for all the help.

View solution in original post

13 REPLIES 13
Top Labels in this Space