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

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now

Reply
mrs13
New Member

Running total: Column vs Measure

Hello, all

 

I have the following problem: from a database that contains a date column; country column; city column and an event name column, I want to display a line chart that accounts for the accumulated number of events through time in each location.

 

This sounds rather easy, and solvable by applyng a Running Total measure. The question is, if I do that, I am not able to display the values in between dates. So if there was a Marathon in New York in March and another in May, my graph will display the Running Total as 1 for March, there will be no data point in April (although visually it will look like a 1.5) and 2 for May. This becomes a problem when I try to also display the share of Marathons that cumulatvely took place in each city in April.

 

The other option I tried to implement was the Running Total column, which would eliminate the missing date issue by creating data points for every date, containing the cumulative value. However, this means sacrificing my ability to filter the data, let's say, by country, beacause the calculated column is statical and is not recalculated once I select a subset of my data.

 

I understand describing the problem without the sample or screen capptures is very subjective, but I have been stuck with this for the past few days, and any ideas would be greatly appreciated.

 

Thanks in advance.

2 REPLIES 2
Phil_Seamark
Microsoft Employee
Microsoft Employee

Hi @mrs13

 

Definitely stick with the calculated measure approach, so you can keep it dynamic.

 

Can you please share the code you are using for your calculated measure?


To learn more about DAX visit : aka.ms/practicalDAX

Proud to be a Datanaut!

Hello, Phil

Thanks for your answer. I am using the following code:

Running Total =
CALCULATE(
COUNTA('Database'[Events]);
FILTER(
ALL('Database'[Date]);
ISONORAFTER('Database'[Date]; MIN('Database'[Date]); DESC)
)
)

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

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