Treating lastValue as an Aggregation

I found a semi-solution I wanted to post in case anyone in the future runs into this issue.

What I opted to do was use RunningSum() to calculate the balance, and then use a date filter on a different date field as described in this Q&A :

I can filter dates and drill down without misrepresenting the value. I have to use a parameter + control to allow users to change the group by method, but this seems to be the best option with how things are currently.

I then use a calculated field to map the parameter + control to the fields in my dataset.

My formula for Balance looks like:

runningSum({charges}, [{date} ASC], [{Grouping Parameter Calc Field}]) - runningSum({payments}, [{date} ASC], [Grouping Parameter Calc Field}])

And then I have the Grouping Parameter Calc Field in the Group By field well of the Visualization.

1 Like