Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
Hi
I am trying to write a dax to create a cummlative total but is isnt working - can anyone help please?
I have the following table - in the cumlative column I want it to total up as I have manually inserted below.
The total Headcount measure is as follows
Report Month | Total Headcount | Cumlative Total |
01 April 2023 | 1893 | 1893 |
01 May 2023 | 1913 | 3806 |
01 June 2023 | 1911 | 5717 |
01 July 2023 | 1897 | 7614 |
I have tried this
Report Month | Total Headcount | Running total |
01/04/2023 | 1893 | 18317 |
01/05/2023 | 1913 | 20230 |
01/06/2023 | 1911 | 22141 |
01/07/2023 | 1897 | 24038 |
01/08/2023 | 1866 | 25904 |
01/09/2023 | 1862 | 27766 |
01/10/2023 | 1831 | 29597 |
Thank you all for you help - I managed to get it working by using the following:-
Hi @Anonymous ,
Could you tell me if your problem has been solved? If it is, kindly Accept it as the solution. More people will benefit from it. Or if you are still confused about it, please feel free to let me know.
Best regards,
Community Support Team_Binbin Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi, I am not sure how your datamodel looks like, but please try something like below whether it suits your requirement.
Running total =
SUMX (
ADDCOLUMNS (
SUMMARIZE (
FILTER (
ALLSELECTED ( 'Calendar' ),
'Calendar'[Report Month] <= MAX ( 'Calendar'[Report Month] )
),
'Calendar'[Report Month]
),
"@result", [Total Headcount]
),
[@result]
)
User | Count |
---|---|
14 | |
9 | |
7 | |
7 | |
6 |
User | Count |
---|---|
21 | |
11 | |
10 | |
10 | |
8 |