Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hi All,
I could use some help with this. I'm trying to come up with a chart as below. The x-axis will be the "Day-Bucket", The primary vertical axis will be Qty and the secondary vertical axis will be the cumulative % of the quantity for the month-year.
https://www.tulane.edu/~salem/Images/Cumulative-Histogram.gif
Sample data is as below, I wish to use the line and clustered column chart but I'm not sure on how to generate the column for the cumulative % line in DAX. The cumulative % line should adjust based on the filtered Month-Year. Any help is appreciated, thank you.
| Day Bucket | Qty | Month-year |
| 0-2 | 754 | 10-2018 |
| >30 | 1 | 10-2018 |
| 0-2 | 667 | 11-2018 |
| 3-5 | 1 | 11-2018 |
| 6-8 | 4 | 11-2018 |
| 12-14 | 5 | 11-2018 |
| 9-11 | 1 | 11-2018 |
There are quite a few aspects to the challenge.
First, you'll need to define an order on the buckets. This will allow you to display the visual correctly AND calculate the cumulative % correctly.
One way to do this is to extract the distinct bins to a table. You could construct the table manually (in excel) or experiment in Power Query but what you want is a 2 column table with
Bin Index
0-2 1
3-5 2
and so on
You then create a relationship between the bins(buckets) on both tables.
Next, get a slicer for Month-year.
Then make sure that you can show Qty on a visual with buckets in the correct order. Use 'Sort by Column' feature to sort buckets by the Index.
If you do this succesfully, write a measure to work out the cumulative quantity. Use a table visualisation to test this.
From there, use the measure you've just written to construct a % change measure.
Then put it all together on the Line and Clustered column chart.
If i was you i'd change the test data to something which shows the changes more distinctly because 1,4,5 are very small compared to 667 so the chart will have a large initial value then flatline.
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 39 | |
| 37 | |
| 33 | |
| 32 | |
| 29 |
| User | Count |
|---|---|
| 132 | |
| 88 | |
| 82 | |
| 68 | |
| 64 |