Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Problems with running totals

I'm having some trouble getting the correct number when a drive has multiple incentives associated with the drive.  And to explain as fully as I can, every drive has a projecture procedure count and when complete, a performed procedure count associated with the drive.  And when a drive has an incentive assigned to it, I would like to count the drive's projected and performed procedure count to the incentive count.  In the screen shot, there are five drives with four each having one incentive to the drive. The incentive count in which only one incentive is assigned to one drive is correct, but the Fandango pre-drive and post-drive counts are off because it is not counting the 12 and 15 that were collected on the bottom drive.

For my running total, I am summing the ProceduresPerformed field, evaluating on the change of field of DriveID (each drive) and reseting on the change of field for EquipmentID (each incentive has its own unique ID).

What would be the best way to handle drives with multiple incentives to get the correct count?

Former Member
Former Member replied

Hey Jamie,

That seems to have done the trick and I've trying to figure out how exactly you did it, but I believe it's above my head right now.

One last question about this, would it be possible to use this array to then calculate a cost for the summarized incentives?

So the totals are correct in the screenshot, but how would I then add a column to the right that would pull from another field in the DB {OBI_EquipmentMaster.UnitCost} to multiple the summary number times the unit cost to get a total cost for the inventory?

For instance, if the units costs are as follows:

Double Fandango = 10

Fandango = 5

Gift Card $10 = 10

Movie Ticket = 5

I would like to cross tab to look like the attached picture.  Would this be possible?

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question