Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
PeteSil
Frequent Visitor

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.

1 REPLY 1
lbendlin
Super User
Super User

"Earlier" has a different meaning in Power BI. 

 

Please provide sanitized sample data that fully covers your issue.
https://community.powerbi.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-...
Please show the expected outcome based on the sample data you provided.

https://community.powerbi.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors