DAX Formula for Running Totals (Student Database)

GiacTorrence

New Member
Joined
Dec 2, 2014
Messages
40
Hi all,

I'm having some issues refining a DAX measure that will calculate the running total for students in a given data set. Essentially, this is what my data look like

Table Name: STUD

HeadcountAcademic Year
Discipline2008/092009/102010/112011/122012/132013/142014/152015/162016/172017/18
Business & Applied Studies222822222828222822222
Tourism & Hospitality Management222822222528222822222

<tbody>
</tbody>

I'm not sure whether I need specific dates to make this function work (as most examples include specified dates), but any help would be greatly appreciated!

Darko
 

Excel Facts

Will the fill handle fill 1, 2, 3?
Yes! Type 1 in a cell. Hold down Ctrl while you drag the fill handle.
Your data isn't very well structured for use in Power Pivot. You want to use the Query Editor to unpivot the data so that you have only three columns; Discipline, Academic Year, and Headcount. You also want your Academic Year column to be a number or a date, if it's really important that the year be formatted like that then add a calendar table that does the conversion.

I'm not quite sure I understand what a running total of headcount looks like, but assuming you just want to add the figures for prior year then you just want something like.

Code:
:=CALCULATE (
    SUM ( STUD[Headcount] ),
    FILTER (
        ALL ( STUD[Academic Year] ),
        STUD[Academic Year] <= MAX ( STUD[Academic Year] )
    )
)
 
Upvote 0

Forum statistics

Threads
1,214,819
Messages
6,121,746
Members
449,050
Latest member
excelknuckles

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top