Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Mike_Mace
Resolver I
Resolver I

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])
    )
)
1 ACCEPTED SOLUTION

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])
    )
)

View solution in original post

4 REPLIES 4
v-eachen-msft
Community Support
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.

1-1.PNG

Here is my test file for your reference.

 

Community Support Team _ Eads
If this post helps, then please consider Accept it as the solution to help the other members find it.

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.

 

 

Capture.JPG

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])
    )
)

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.