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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
terdudov
New Member

Cummulative total by month by product

I have a request for help with my case. I have tried various solutions from here, but my case seems somehow specific.

 

I have this kind of data in a table:

DateAnalytical accountAccount value
04.V.221650003 000
04.V.2216500050
04.V.2216500010
01.I.2225100040
24.II.2225100050
04.V.2225100040 000
04.V.22251000200
18.II.2243200020
08.V.224320001 000

 

I need to create a pivot/graph with cummulative totals by Month AND Analytical account. The result should show:

Analytical accountCummulative value
1650003 060
V3 060
25100040 290
I40
II90
V40 290
4320001 020
II20
V1 020

 

Thank you in advance for help!

 

1 ACCEPTED SOLUTION
v-yinliw-msft
Community Support
Community Support

Hi @terdudov ,

 

You can try this method.

vyinliwmsft_0-1666951615202.png

vyinliwmsft_1-1666951625246.png

Cummulative Value = 
CALCULATE (
    SUM ( 'Table'[Account value] ),
    FILTER (
        ALL ( 'Table' ),
        [Analytical account] = MAX ( 'Table'[Analytical account] )
            && [Month] <= MAX ( 'Table'[Month] )
    )
)

 

vyinliwmsft_2-1666951677032.png

 

Is this the result you expect?

 

Hope this helps you.

 

Best Regards,

Community Support Team _Yinliw

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

4 REPLIES 4
v-yinliw-msft
Community Support
Community Support

Hi @terdudov ,

 

You can try this method.

vyinliwmsft_0-1666951615202.png

vyinliwmsft_1-1666951625246.png

Cummulative Value = 
CALCULATE (
    SUM ( 'Table'[Account value] ),
    FILTER (
        ALL ( 'Table' ),
        [Analytical account] = MAX ( 'Table'[Analytical account] )
            && [Month] <= MAX ( 'Table'[Month] )
    )
)

 

vyinliwmsft_2-1666951677032.png

 

Is this the result you expect?

 

Hope this helps you.

 

Best Regards,

Community Support Team _Yinliw

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

 

 

 

VahidDM
Super User
Super User

Hi    @terdudov 

If you need somthing like :

 

 

Then download the sample file and check the formulas:
1- Add a column for month: 

Month = Format('Table'[Date],"mmm")
2- Then use this measure:
Sum ACC Value = CALCULATE ( SUM ( 'Table'[Account value] ), REMOVEFILTERS ( 'Table'[Month] ), KEEPFILTERS ( 'Table'[Date] <= MAX ( 'Table'[Date] ) ) )

 

 

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

Appreciate your Kudos!! 

Badges.jpg

LinkedIn | Twitter | Blog | YouTube 

 

Hello @VahidDM 

 

Thank you a lot, your solution gave me my result. Only I have one issue. What if  want to have all months from 1-12 in the table? Then it shows me no values for example for Analytical account 251000, month 3. However I would want it to show month-to-date value = 90 (e.g. value from moths 1+2). Is there a solution for this?

 

Thank you!

You can add IF statement and add those rules to it, that will work for your condition

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

Appreciate your Kudos!! 

Badges.jpg

LinkedIn | Twitter | Blog | YouTube 

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

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.

Top Solution Authors