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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
TTS
Frequent Visitor

Sum cumulative measures

I have measure that calculates cumulative sales from fact_sales. Then I have another measure that calculates cumulative sum for backlog from fact_ob. Both tables are linked to dim_calendar.

 

Now I need 3rd measure that combines these two together to show total demand. I was able to make it happen in matrix visual but not in graph.

 

Any ideas?

2 ACCEPTED SOLUTIONS
Cookistador
Super User
Super User

Hello, you should have something similar to this measure

 

TotalCumulativeDemand =
VAR CurrentDate = MAX(dim_calendar[Date]) // Get the current date from the axis
VAR CumulativeSales =
CALCULATE(
SUM(fact_sales[SalesAmount]), // Replace with your actual sales column
FILTER(
ALL(dim_calendar[Date]),
dim_calendar[Date] <= CurrentDate
)
)
VAR CumulativeBacklog =
CALCULATE(
SUM(fact_ob[BacklogAmount]), // Replace with your actual backlog column
FILTER(
ALL(dim_calendar[Date]),
dim_calendar[Date] <= CurrentDate
)
)
RETURN
CumulativeSales + CumulativeBacklog

 

Or you can try to do it with New visual calculation

Cookistador_0-1743535561787.png

 

 

If it is not what you are trying to achieve, let me know and maybe share an example with us

View solution in original post

Basically this solved the case. Just needed some tuning for some points for my case and data. Great thanks. 

View solution in original post

5 REPLIES 5
v-saisrao-msft
Community Support
Community Support

Hi @TTS,

May I ask if you have resolved this issue? If so, please mark the helpful reply and accept it as the solution. This will be helpful for other community members who have similar problems to solve it faster.

Thank you.

v-saisrao-msft
Community Support
Community Support

Hi @TTS,
I wanted to check if you had the opportunity to review the information provided by @Cookistador. Please feel free to contact us if you have any further questions. If the response has addressed your query, please accept it as a solution and give a 'Kudos' so other members can easily find it.
Thank you.

ryan_mayu
Super User
Super User

@TTS 

pls proivde some sample data and expected output





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Cookistador
Super User
Super User

Hello, you should have something similar to this measure

 

TotalCumulativeDemand =
VAR CurrentDate = MAX(dim_calendar[Date]) // Get the current date from the axis
VAR CumulativeSales =
CALCULATE(
SUM(fact_sales[SalesAmount]), // Replace with your actual sales column
FILTER(
ALL(dim_calendar[Date]),
dim_calendar[Date] <= CurrentDate
)
)
VAR CumulativeBacklog =
CALCULATE(
SUM(fact_ob[BacklogAmount]), // Replace with your actual backlog column
FILTER(
ALL(dim_calendar[Date]),
dim_calendar[Date] <= CurrentDate
)
)
RETURN
CumulativeSales + CumulativeBacklog

 

Or you can try to do it with New visual calculation

Cookistador_0-1743535561787.png

 

 

If it is not what you are trying to achieve, let me know and maybe share an example with us

Basically this solved the case. Just needed some tuning for some points for my case and data. Great thanks. 

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.