Forum Discussion
Cumulative Earned
Hi good day,
Can someone help me on my calulated column on my table below.
DESIRED OUTPUT
Thank you
hello AllanBerces
please check if this accomodate your need.
i assume every different value inside the table always has 3 duplicates. if yes, then you can summarize it first before calculating cumulative.
create a new calculated column with following DAX.
Cumulative Earned =
var _Sum =
SUMMARIZE(
'Table',
'Table'[Date],
'Table'[Name],
'Table'[WeeklyEarned]
)
Return
SUMX(
FILTER(
_Sum,
'Table'[Date]<=EARLIER('Table'[Date])&&
'Table'[Name]=EARLIER('Table'[Name])
),
'Table'[WeeklyEarned]
)Hope this will help.
Thank you.
5 Replies
- FreemanZSuper User
hi AllanBerces ,
try like:
Earned =VAR CurrentDate = 'Table1'[Date]VAR CurrentSubTask = 'Table1'[Name]returnSUMX(FILTER('Table1','Table1'[Date]<=CurrentDate&& 'Table1'[Name]= CurrentSubTask),'Table1'[Weekly_Earned]) - Ashish_MathurSuper User
- IrwanSuper User
hello AllanBerces
please check if this accomodate your need.
i assume every different value inside the table always has 3 duplicates. if yes, then you can summarize it first before calculating cumulative.
create a new calculated column with following DAX.
Cumulative Earned =
var _Sum =
SUMMARIZE(
'Table',
'Table'[Date],
'Table'[Name],
'Table'[WeeklyEarned]
)
Return
SUMX(
FILTER(
_Sum,
'Table'[Date]<=EARLIER('Table'[Date])&&
'Table'[Name]=EARLIER('Table'[Name])
),
'Table'[WeeklyEarned]
)Hope this will help.
Thank you.
- AllanBercesPost Prodigy
Hi Irwan Ashish_Mathur FreemanZ thank you very much for ther reply, work great.
- Ashish_MathurSuper User
You are welcome.