Forum Discussion

Jolien's avatar
Jolien
Icon for Advocate I rankAdvocate I
7 years ago
Solved

Cumulative sum too high

 

Dear all,

 

I’m new to Power BI and I’m struggling to calculate the cumulative sum of my actuals.

I’ve transposed the [JAN], [FEB], [MAR], … columns from my dataset to [Actual] and [Time]. This caused each project to be shown 12 times, each time with a different [Actual] value:

 

Showing the SUM of Actuals for each month posed no issues, I just added a matrix and this is the result:

However, calculating the cumulative sum has got me puzzled.

Based on other threads, I created this calculated column:

Cumulative Actual =
CALCULATE(
   SUM(Daily[Actual]);
   ALL(Daily);Daily[Time] <= EARLIER(Daily[Time])
)

And this was the result:

I have no idea what the correlation between the values 14.059.410,86 and 20.076.838.708,08 is, but it is definitely not *12, so I have no idea how it could be so high.

 

Adding a FILTER to the calculated column had no impact on the result

Cumulative Actual =
CALCULATE(
   SUM(Daily[Actual]);
   FILTER(ALL(Daily);Daily[Time] <= EARLIER(Daily[Time]))
)

When updating the calculated column to

Cumulative Actual =
CALCULATE(
   SUM(Daily[Actual]);
   FILTER(ALL(Daily[Actual]);Daily[Time] <= EARLIER(Daily[Time]))
)

the result was the same as the monthly total:

 

Could anyone please help me out? I’ve been struggling with this too long already!

  • Hi,

     

    Can you please confirm the "Actual" value in the 4rth row of the table, i.e 01/03/2019?

     


    Jolien wrote:

     

    Dear all,

     

    I’m new to Power BI and I’m struggling to calculate the cumulative sum of my actuals.

    I’ve transposed the [JAN], [FEB], [MAR], … columns from my dataset to [Actual] and [Time]. This caused each project to be shown 12 times, each time with a different [Actual] value:

     

    Showing the SUM of Actuals for each month posed no issues, I just added a matrix and this is the result:

    However, calculating the cumulative sum has got me puzzled.

    Based on other threads, I created this calculated column:

    Cumulative Actual =
    CALCULATE(
       SUM(Daily[Actual]);
       ALL(Daily);Daily[Time] <= EARLIER(Daily[Time])
    )

    And this was the result:

    I have no idea what the correlation between the values 14.059.410,86 and 20.076.838.708,08 is, but it is definitely not *12, so I have no idea how it could be so high.

     

    Adding a FILTER to the calculated column had no impact on the result

    Cumulative Actual =
    CALCULATE(
       SUM(Daily[Actual]);
       FILTER(ALL(Daily);Daily[Time] <= EARLIER(Daily[Time]))
    )

    When updating the calculated column to

    Cumulative Actual =
    CALCULATE(
       SUM(Daily[Actual]);
       FILTER(ALL(Daily[Actual]);Daily[Time] <= EARLIER(Daily[Time]))
    )

    the result was the same as the monthly total:

     

    Could anyone please help me out? I’ve been struggling with this too long already!



    If you want something like cumulative actual as "Running Total", you can create a Quick measure in that table. 

     

     

2 Replies

  • Hi,

     

    Can you please confirm the "Actual" value in the 4rth row of the table, i.e 01/03/2019?

     


    Jolien wrote:

     

    Dear all,

     

    I’m new to Power BI and I’m struggling to calculate the cumulative sum of my actuals.

    I’ve transposed the [JAN], [FEB], [MAR], … columns from my dataset to [Actual] and [Time]. This caused each project to be shown 12 times, each time with a different [Actual] value:

     

    Showing the SUM of Actuals for each month posed no issues, I just added a matrix and this is the result:

    However, calculating the cumulative sum has got me puzzled.

    Based on other threads, I created this calculated column:

    Cumulative Actual =
    CALCULATE(
       SUM(Daily[Actual]);
       ALL(Daily);Daily[Time] <= EARLIER(Daily[Time])
    )

    And this was the result:

    I have no idea what the correlation between the values 14.059.410,86 and 20.076.838.708,08 is, but it is definitely not *12, so I have no idea how it could be so high.

     

    Adding a FILTER to the calculated column had no impact on the result

    Cumulative Actual =
    CALCULATE(
       SUM(Daily[Actual]);
       FILTER(ALL(Daily);Daily[Time] <= EARLIER(Daily[Time]))
    )

    When updating the calculated column to

    Cumulative Actual =
    CALCULATE(
       SUM(Daily[Actual]);
       FILTER(ALL(Daily[Actual]);Daily[Time] <= EARLIER(Daily[Time]))
    )

    the result was the same as the monthly total:

     

    Could anyone please help me out? I’ve been struggling with this too long already!



    If you want something like cumulative actual as "Running Total", you can create a Quick measure in that table. 

     

     

    • Jolien's avatar
      Jolien
      Icon for Advocate I rankAdvocate I

      Thanks slanka, it was indeed easy as that. Creating a running total measure solved it :)

       

      Thanks for the help!