Forum Discussion

bourne2000's avatar
bourne2000
Helper V
3 years ago

Calculating Running Total using DAX Measures

Hi 

 

I have four tables which is connected as below

 

 

 

 

I have calculated below measures

 

 

 

 

 

Total Hours = CALCULATE(SUM('project__employee_timesheet'[Total Hours]),'aloro_live project__costcode_budget'[project_token] = "76212727")

 

 

 

 

 

 

 

 

 

 

 

JTD Qty Complete = CALCULATE(SUM('aloro_live project__costcode_quantity'[quantity]),'aloro_live project__costcode_quantity'[project token] = "76212727" )

 

 

 

 

 

 

 

 

 

 

 

JTD Unit Hours = IFERROR([Total Hours]/[JTD Qty Complete],0) * 100

 

 

 

 

 



All the above three measures are working correct. I would like calculate running total for JTD Unit Hours and I used below two measures but results are not correct
 

 

 

 

 

 

JT Unit Hours RT = SUMX(FILTER(ALLSELECTED('Date'[Date]), 'Date'[Date]<=MAX('Date'[Date])), [JTD Unit Hours])

 

 

 

 

If I use the above formula, I am getting below results. I visualize using weekend date

 

 

I used another below dax measures to calculate Running total again, the results are not correct

 

 

 

 

Unit Hours RT = CALCULATE([JTD Unit Hours], DATESYTD('Date'[Date]))

 

 

 

 

 

 
 
 

2 Replies