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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.

Reply
ColetonC
Regular Visitor

Reducing a value from a column by week in a DAX table

I am trying to show a reduciton in a projects budget each week by subtracting the weekly billed amount from the original budget amount. I currently have a summary table pulling in the weekly billed amount by project here:

ColetonC_1-1707951767126.png

 

ColetonC_0-1707951752456.png

The contract budget is from a separate table all other columns are from the same table. 

 

I am trying to show the new available budget each week by subtracting the billed amount. My desired outcome is here:

ColetonC_2-1707951906249.png

I am having trouble determing the correct DAX to make this result happen. 

7 REPLIES 7
Ashish_Mathur
Super User
Super User

Hi,

Why are you creating a DAX table?  Why are you not solving it with a measure?  Do you have a Date column?  If you are OK with a measure solution and have a Date column, then share the download link of the PBI file. 


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

I did try a measure initially but had trouble geting a reduction by week to be illustrated in a visual. There is a date column in the table with containing the expense data. (I have a calendar table that is connected to the dates in the expense table.) There is not a date column in the table containing the project data (budget). Here is the measure I tried 

ColetonC_0-1708007319276.png

 

As requested earlier, share some data to work with and show the expected result.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Here is the result I am looking for 

ColetonC_0-1708555013477.png

I have a PowerBI file I can now share but I am not able to share in this reply. What is the best way to share the PBIX file?

 

Upload the file to Google Drive/One Drive and share the download link.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
Anonymous
Not applicable

Hi, @ColetonC 

I'm happy to answer your questions. You can modify your formula according to the DAX formula I provide below. Then add a calculated column to find Remianning Budgett:

DAX formula:

Test Project Billed = 
var T= SUMMARIZE('Employee Time',[Project#],[Calendar Week],"Dollars Billed",SUM('Employee Time'[Dollars Billed]),"Hours Billed",SUM('Employee Time'[Billable Hours Worked]),"Contract Budget",MAX('Project List'[Contact Budget Amount]))
RETURN ADDCOLUMNS(T,"index",ROWNUMBER(T))

I added an index column to the DAX formula, mainly to assist calculations. The generated summary table is as follows:

1.png

You calculate Remianning Budgett using the DAX formula below:

DAX formula:

Remainning Budgett = 
var _Total = MAX('Test Project Billed'[Contract Budget])
var _R_Total = CALCULATE(SUM('Test Project Billed'[Dollars Billed]),FILTER('Test Project Billed','Test Project Billed'[index]<=EARLIER('Test Project Billed'[index])))
RETURN _Total-_R_Total

The cumulative difference is achieved through the Index column and the EARLIER function. The results are as follows:

2.png

I have provided the sample PBIX file used this time below. The above are my thoughts on Remaining Budgett. If it can help you, that would be great.

 

 

 

 

 

How to Get Your Question Answered Quickly

If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .

Best Regards

Jianpeng Li

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

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