Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code FABINSIDER for a $400 discount.
Register nowThe Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.
Hello,
I am trying to create a stacked column chart with cumulative sum.
I used the following formula to calculate the cumulative sum:
CumulativeCapacity = CALCULATE(SUM(Append1[MWel]),
That works when I use without any field in category:
But when I try to add category, it multiplies each sum per category for the number of categories that year:
I then change the DAX formula to:
My problem is that I dont have all Categories = "Current Stage" for all years. But I would like to see per instance in 2032 also the cumulative sum for construction, feasibility study and preparatory stage. How can I solve this issue?
Hi @sarabaia,
You cna try to use the follwoing meaure formula to the get cumlative result based current date and stage groups:
CumulativeCapacity =
CALCULATE (
SUM ( Append1[MWel] ),
FILTER (
ALLSELECTED ( Append1 ),
Append1[Announced start date] <= MAX ( Append1[Announced start date] )
),
VALUES ( Append1[Current stage] )
)
Regards,
Xiaoxin Sheng
Sorry but does not work, when I use the proposed formula this is my result and I want to see as well 2032-2040 the sum of other categories even if there was no addition on that year in that categories/stage:
Hi @sarabaia ,
Can you please share a pbix or some dummy data that keep the raw data structure with expected results? It should help us clarify your scenario and test to coding formula.
How to Get Your Question Answered Quickly
Regards,
Xiaoxin Sheng
Hello please see attached, the pbix file with dummy data: https://we.tl/t-oxXJb0Wnvr . And the results with proposed formulas.
Anyway I solve the issue creating a calculated table:
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the February 2025 Power BI update to learn about new features.
User | Count |
---|---|
82 | |
81 | |
52 | |
39 | |
35 |
User | Count |
---|---|
95 | |
79 | |
52 | |
49 | |
47 |