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

Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!

Reply
Jay20024
Helper I
Helper I

Cumulated value issue and bar chart

Hi folks,

Got a classic 2 months dataset with transaction dates (Jan & Feb), suppliers and amount, linked to a DimDate table.

Created a button to switch between Running cost & accumulated.

Add the Supplier field as legend

 

Works partialy in a pivot table, Total accumulated is correctly calculated in Feb, but not the details

Doesn't work in a barchart,  it accumulates only suppliers with amounts in Jan & Fev

Supplier 05 & 07 have no data in Fev, so they are not taken in account in the barchart in Feb.

How can I fix that ?

 

I thank you in advance folks

 

Cumu.PNGRun.PNG

2 ACCEPTED SOLUTIONS
Jihwan_Kim
Super User
Super User

Hi,

Please check the below picture and the attached pbix file.

I tried to create a sample pbix file like below.

 

Jihwan_Kim_1-1742531516635.png

Jihwan_Kim_2-1742531533931.png

 

 

 

Jihwan_Kim_0-1742531479932.png

 

 

 

Sales: = 
SUM( sales[sales] )

 

 

Sales cumulate: = 
IF (
    [Sales:],
    CALCULATE (
        [Sales:],
        FILTER (
            ALL ( 'calendar'[Year-Month sort], 'calendar'[Year-Month] ),
            'calendar'[Year-Month sort] <= MAX ( 'calendar'[Year-Month sort] )
        )
    )
)

 


If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

View solution in original post

Once again, @Jihwan_Kim, you made my day. Seeing your cumulated measure, I realized that I got a condition in my measure, blacklisting blank values ! Just removed it and it works like a charm. Many thanks for your expertise !

View solution in original post

3 REPLIES 3
Jihwan_Kim
Super User
Super User

Hi,

Please check the below picture and the attached pbix file.

I tried to create a sample pbix file like below.

 

Jihwan_Kim_1-1742531516635.png

Jihwan_Kim_2-1742531533931.png

 

 

 

Jihwan_Kim_0-1742531479932.png

 

 

 

Sales: = 
SUM( sales[sales] )

 

 

Sales cumulate: = 
IF (
    [Sales:],
    CALCULATE (
        [Sales:],
        FILTER (
            ALL ( 'calendar'[Year-Month sort], 'calendar'[Year-Month] ),
            'calendar'[Year-Month sort] <= MAX ( 'calendar'[Year-Month sort] )
        )
    )
)

 


If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Once again, @Jihwan_Kim, you made my day. Seeing your cumulated measure, I realized that I got a condition in my measure, blacklisting blank values ! Just removed it and it works like a charm. Many thanks for your expertise !

d_m_LNK
Super User
Super User

Is it as simple as adding the Month column from you date/calendar table onto the X Axis of your bar chart visual and the column portion of the matrix visual?  

If it's something more complex can you share the measure you are using to evaluate in both visuals?

-----------------------
Did this help?
Drop a kudo so others can find it ! 😄
Mark as a solution if it helped you make progress on your issue 😃

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

Vote for your favorite vizzies from the Power BI World Championship submissions!

Sticker Challenge 2026 Carousel

Join our Community Sticker Challenge 2026

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

January Power BI Update Carousel

Power BI Monthly Update - January 2026

Check out the January 2026 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.