Forum Discussion

Mike_Mace's avatar
Mike_Mace
Resolver I
6 years ago
Solved

Adding a column or a sum to a Running Column

I am using a running formula for a measure further below. I show running curves on graphs with dates on X axis.

For one specific running measure I need to add the sum of a column in another table (or its running equivalent - whatever is easier). 

SUM doesnt seem to work because it calculates to 1 scalar value

SUMX doesnt seem to work either.

 

Ideas?

 

 

Running =
CALCULATE(
    SUM(column),
    FILTER(
        ALLSELECTED('Date Calendar'[Date Calendar]),
        'Date Calendar'[Date Calendar] <= MAX('Date Calendar'[Date Calendar])
    )
)
  • I was able to solve this by adding the columns on the same DAX calculating the running

     

    Running =
    CALCULATE(
        (SUM('Recovery'[Recovery]) + SUM('Actuals'[Actual])),
        FILTER(
            ALLSELECTED('Date Calendar'[Date Calendar]),
            'Date Calendar'[Date Calendar] <= MAX('Date Calendar'[Date Calendar])
        )
    )

4 Replies

  • v-eachen-msft's avatar
    v-eachen-msft
    Community Support

    Hi Mike_Mace ,

     

    Your DAX seems to be correct. I created a test file and show the correct result.

    You could check the relationships.

    Here is my test result.

    Here is my test file for your reference.

     

    • Mike_Mace's avatar
      Mike_Mace
      Resolver I

      Hi v-eachen-msft ,

       

      Yes running DAX works thanks for confirming. So now I have two running columns on that DAX.

      I need a third column which adds the two columns per row.  That would make14th of Feb sum 6 and 19th of March 15 on table below.

      This is where i tried SUMX but couldn't get anywhere.