Forum Discussion

PeteSil's avatar
PeteSil
Frequent Visitor
3 years ago

Calculating an Earlier Sum Based off Multiple Criteria

Hello,

 

I am currently trying to pull last month's total for a certain line item that has the following criteria:

-Project

-Cost Code

-Amount

Example of the columns would be:

Month Project Cost Code Amount
9/1/20223704250$10,700
9/1/20223704280$7,800
10/1/20223704250$11,200

 

What I would need the measure to do, is figure out the what the sum is of the earlier amount by Project & Cost Code, referencing the Month column. Mind you there are multiple Projects & an abundance of Cost Codes. So simply having it Filter just for Project 3704 & Cost Code 250 wont work. It needs to be able to find the earlier amount for each item, if there isn't an earlier amount then output 0.

 

Will truly appreciate any help on this, been stuck for quite some time.