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
Anonymous
Not applicable

Running total by month based on selected year

Hi Team,

I need your help in solving the below problem.

Need to find out the running total based on selected year and show by month,here is sample data.

rajveer1117_1-1606336146734.png

Thanks,
Raj

1 ACCEPTED SOLUTION

Hi,

 

Please try the formula.

Running total =

CALCULATE(

    SUMX(

        SUMMARIZE( Sheet1, [Month], "_test", [Test] ),

        [Test]

    ),

    FILTER(

        ALLSELECTED(Sheet1),

        Sheet1[Month] <= MAX([Month])

    )

)

 

v-lionel-msft_0-1606703534435.png

 

Best regards,
Lionel Chen

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

View solution in original post

8 REPLIES 8
themistoklis
Community Champion
Community Champion

@Anonymous 

 

Try the following formula:

 

Cumulative_Actual = 
CALCULATE (
    SUM ( Sheet1[Values] ),
    FILTER( ALL (Sheet1 ),
    Sheet1[Month] <= MAX( Sheet1[Month] ))
)

 

Anonymous
Not applicable

Just to give you more information, the test field is a calculated measure of average of 4 year.

Hi,

 

Please try the formula.

Running total =

CALCULATE(

    SUMX(

        SUMMARIZE( Sheet1, [Month], "_test", [Test] ),

        [Test]

    ),

    FILTER(

        ALLSELECTED(Sheet1),

        Sheet1[Month] <= MAX([Month])

    )

)

 

v-lionel-msft_0-1606703534435.png

 

Best regards,
Lionel Chen

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

@Anonymous 

 

It is a bit confusing now.

Do you require cumulative total across 12 months on a selected year; based on the initial description?

 

or Average across selected years ... and cumulative sum on this average, across months?

If you could send a sample table of how you want the output table to look like that would be great

 

 

Anonymous
Not applicable

this is what i am seeing in the output after implementing.

rajveer1117_0-1606337173244.png

 

lkalawski
Memorable Member
Memorable Member

Hi @Anonymous 

Did you try to use this pattern:

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

 

Please add the sample data or .pbix file without personal information and I will try to help you. 



_______________
If I helped, please accept the solution and give kudos! 😀

Anonymous
Not applicable

Here i want to show cummulative for each year by month.

Anonymous
Not applicable

I tried it but it is not giving the righ result.

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.