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
andvpp
Frequent Visitor

Obtain one histogram bar from a waterfall chart

Hello,

I am a new Power BI user and I am struggling to create a histogram with cumulative sums inside the bars. 

 

I have seen that the Waterfall charts do this very nicely, adding the values of certain briques to reach a specific number.
But I haven't been able to translate this information into a single bar. Is it possible? 

You see on the left that I can see the "detail" of my sum reaching the good final value of 4. Nevertheless, on the right, when I use stacked bars, the values are added independently and reaches a much larger value. 


test_powerbi.png

 

 If anybody has a suggestion on how to specify that it is a cumulative sum, I would really appreciate it. 

Thank you,

Andrea

3 REPLIES 3
v-haibl-msft
Employee
Employee

@andvpp

 

You need to add an index column in Query Editor and then create a measure to get the cumulative sum result. Uploaded my PBIX file here for reference. You can also take a look at this article to understand more about how to get Cumulative Total.

 

Obtain one histogram bar from a waterfall chart_1.jpg

 

Cumulative = 
CALCULATE (
    SUM ( Table1[Values] ),
    FILTER ( ALL ( Table1 ), Table1[Index] <= MAX ( Table1[Index] ) )
)

Obtain one histogram bar from a waterfall chart_2.jpg

 

Best Regards,

Herbert

Herbert,

Thank you very much for taking a look at my post and replying!

I still have one question though, maybe you can help me with this too.

If you see the image I posted, on the right there is a Bar with Stacked Values.

Is there a way to create a column or something to use as a color filter so that my graph looks like that?

Ideally, the bar starts at -10, finishes at 4 as the cumulative sum, and has a color filter showing the Briques that are being added.

Have a nice day!

Andrea

@andvpp

 

You only need to add Birques to Legend as below. But there will be a little difference, the column bar will start from the biggest negative number -2 but not -10.

Obtain one histogram bar from a waterfall chart_3.jpg

 

Best Regards,

Herbert

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.