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

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

Reply
Anonymous
Not applicable

Running total per age group (no date-column)

What am I doing wrong?

I need to find the average age group that people die of COVID-19. So I thought first to make a calculated column of Running Total deaths per age category. And then find the value that is just over half of the total number of deaths and produce the corresponding age-group.

 

The first step already doesn't work for me. I tried all the community posts I could find but no answer.

 

Calculated column

Schermafbeelding 2020-03-31 om 08.14.49.png

Table:

Schermafbeelding 2020-03-31 om 08.15.07.png

 

As you can see the table just shows the total number of deaths on each row.

I tried the formula without "FILTER", but that returns an error:

 

Schermafbeelding 2020-03-31 om 08.22.02.png

 

Please help!

6 REPLIES 6
v-diye-msft
Community Support
Community Support

Hi @Anonymous 

 

If you've fixed the issue on your own please kindly share your solution. if the above posts help, please kindly mark it as a solution to help others find it more quickly.thanks!

 

 

Community Support Team _ Dina Ye
If this post helps, then please consider Accept it as the solution to help the other members find it more
quickly.
amitchandak
Super User
Super User

@Anonymous , Your formula is correct, but that is measure not column.

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not applicable

ok. In other posts it looked like the measure and column-solutions were almost identical, and columns I can see quicker what it looks like, but let me try measure instead..

 

Well, it worked! 

 

opgeteld overleden =
VAR RT =
CALCULATE(
SUM('Confirmed COVID-19 cases by sex and age'[Deaths]);
FILTER(
ALL('Confirmed COVID-19 cases by sex and age');
'Confirmed COVID-19 cases by sex and age'[Index] <= max ( 'Confirmed COVID-19 cases by sex and age'[Index] )
))
VAR TOTALD = CALCULATE(sum('Confirmed COVID-19 cases by sex and age'[Deaths]);ALLSELECTED())
RETURN
DIVIDE(RT;TOTALD;0)
 
Schermafbeelding 2020-03-31 om 08.47.43.png
 
Next step: finding the 50% category (80-84y)
 
And I still don't know what went wrong with the column. But I'm out of the woods for now!
 
 
 

Try like

opgeteld overleden =

RETURN
DIVIDE(CALCULATE(
SUM('Confirmed COVID-19 cases by sex and age'[Deaths]);
FILTER(
ALL('Confirmed COVID-19 cases by sex and age');
'Confirmed COVID-19 cases by sex and age'[Index] <= max ( 'Confirmed COVID-19 cases by sex and age'[Index] )
));CALCULATE(sum('Confirmed COVID-19 cases by sex and age'[Deaths]);ALL('Confirmed COVID-19 cases by sex and age'));0)

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
miltenburger
Helper V
Helper V

Hi @Anonymous 

 

Can you try following:

 

 

Cumulative Quantity =
CALCULATE (
    SUM ( 'Confirmed COVID-19 cases by sex and age'[Deaths] ),
    FILTER (
        ALL ( 'Confirmed COVID-19 cases by sex and age' ),
        'Confirmed COVID-19 cases by sex and age' [Index] <= MAX ( 'Confirmed COVID-19 cases by sex and age' [Index] )
    )
)

 

Anonymous
Not applicable

Tried. Shows something different now. No Totals running yet 😞

Schermafbeelding 2020-03-31 om 08.39.48.png

 

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors
Top Kudoed Authors