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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

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
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

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.

Top Solution Authors