cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
imranamikhan
Helper V
Helper V

Cumulative total of a measure

Hi everyone,

 

I am struggling to identify a solution to a common problem resolved in the forums. Out of ignorance I have blindly attempted multiple suggestions but I have not been successful.

 

I have 2 measures. 

 

1.  The below measure returns whatever the selected value is from a slicer

 

 

Selected Project = SELECTEDVALUE('Programme Financials Unpivot'[Project No.], BLANK())

 

 

 

2. The below measure sums a column by multiple conditions.  The measure above is also used as part of a condition.


Total = CALCULATE(

SUM('Programme Financials Unpivot'[Value]),

FILTER(

                'Programme Financials Unpivot',

                'Programme Financials Unpivot'[Attribute] = MIN(Period_Table[Attribute]) && 'Programme Financials Unpivot'[Period Snapshot] = 12 && 'Programme Financials Unpivot'[Project No.] = [Selected Project]

                )

)

 

 

I now want to create a cumulative/running total of the Total measure. 

 

Could you anyone please advise? The solutions I use often return the same result as the Total measure.


example.PNG

regards,

Amik

1 ACCEPTED SOLUTION
imranamikhan
Helper V
Helper V

Resolved. I removed the custom table and created an index in the source table ("Programme Financials Unpivot"), then followed the suggestions below

https://www.daxpatterns.com/cumulative-total/

View solution in original post

4 REPLIES 4
imranamikhan
Helper V
Helper V

Resolved. I removed the custom table and created an index in the source table ("Programme Financials Unpivot"), then followed the suggestions below

https://www.daxpatterns.com/cumulative-total/

imranamikhan
Helper V
Helper V

Hi @themistoklis thanks for the suggestion.

I do not want to apply a cumulative/running total measure using the "Programme Financials Unpivot" table as the source. I am actually trying to apply this measure to the Total measure in the table I displayed above.

This table is a custom table. The values returned by the Total measure are derived from "Programme Financials Unpivot" table using a number of conditions.

Do you know if this a way to apply a running total/cumulative to this table?

 

best regards,

Amik

Hi everyone - any ideas on this one?

themistoklis
Super User
Super User

@imranamikhan 

 

Can you try the following:

Running Total =
CALCULATE ( [Total] ,
ALL ( 'Programme Financials Unpivot' ),
'Programme Financials Unpivot'[Index] <= EARLIER ( 'Programme Financials Unpivot'[Index] )
)

Helpful resources

Announcements
November 2022 Update

Check it Out!

Click here to read more about the November 2022 updates!

Difinity Conference

Difinity Conference 2022

Difinity is the largest Microsoft Data, AI, Power BI, Power Platform and Business Applications Conference in New Zealand.

European Share Point Conference

European Share Point Conference

This conference returns live and in-person in Copenhagen this 28 November-01 December with 4 Microsoft Keynotes, 9 Tutorials, and 120 Sessions.

Microsoft 365 Conference â__ December 6-8, 2022

Microsoft 365 Conference - 06-08 December

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.