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

Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!

Reply
Anonymous
Not applicable

Power BI running total from PWA data

Hi Team,

I am trying to create a cashflow dashboard in Power BI for the total cost from a set of PWA data.

I have Power BI attached to the database and have created the below DAX code having followed some youtube tutorials:

Cumulative total =CALCULATE(    AssignmentTimephasedDataSet[AssignmentCost],    FILTER(        all(AssignmentTimephasedDataSet[TimeByDay],)        AssignmentTimephasedDataSet[TimeByDay] < max(AssignmentTimephasedDataSet[TimeByDay])))

 

Where AssignmentCost is the cost field, I have used this for a monthly cost and it works. Am i looking at this in the right way, help please nearly lost a whole day on this.

 

I have also tried to add a column to the dataset to do the running total using the code below and trying to point it at a specific project: 

 

Rolling total cost = var CurrentDate = AssignmentTimephasedDataSet[TimeByDay]                    var FilteredTable = FILTER(AssignmentTimephasedDataSet,AssignmentTimephasedDataSet[TimeByDay]<=CurrentDate)                    && Projects[ProjectName]= "Nimbin Water Main Resintatement"                                       return
                    Calculate(AssignmentTimephasedDataSet[AssignmentCost],FilteredTable) 

 

Again no joy please help Thanks

5 REPLIES 5
Anonymous
Not applicable

Hi,

The issue there is that I am dealing with data that comes from the Project Web Application (PWA).

 

The adat set is huge even for the small amount of projects I currently have in there.

 

The expected result would be a month by month running total of the project cost...

Hi,

This pattern should work.

  1. Create a Calendar Table and write calculated column formulas for Year, Month name and Month number.  Sort the Month name by the Month number
  2. Create a relationship (Many to One and Single) from the Date column of your Data Table to the Date column of the Calendar Table
  3. To yoru visual, drag Project, Year and Month name from the Calendar Table
  4. Write these measures

Total = sum(Data[Total])

Total YTD = calculate([Total],datesytd(Calendar[Date],"31/12"))

The YTD calculation would restart in January each year.

Hope this helps.


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

Thanks I will give that a shot.

 

As my daata already has Time by day in the table could I use that perhaps or am i trying to overcomplicate this...?

You are welcome.  You will need a proper date column (without a time stamp)


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

Hi,

Share some data in a format that can be pasted in an MS Excel file and show the expected result very clearly.


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

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

Vote for your favorite vizzies from the Power BI World Championship submissions!

Sticker Challenge 2026 Carousel

Join our Community Sticker Challenge 2026

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

January Power BI Update Carousel

Power BI Monthly Update - January 2026

Check out the January 2026 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.