cancel
Showing results for
Did you mean:
Frequent Visitor

## How to get Cumulative Employee Tables per Fiscal year

Im trying to get these tables to stack, so each fiscal year has an adds the employees in previous year and adds the new ones but the cumulative total function isnt working for me. It only sums the new employees addded that year. Need help with DAX or measure or how to approach it differently

1 ACCEPTED SOLUTION
Microsoft

```Running Total Measure =
CALCULATE (
COUNTA ( Data[StaffLevelName] ),
FILTER ( ALL ( Data ), Data[FiscalStartYear] <= MAX ( Data[FiscalStartYear] ) )
)
```

Best Regards,

Dale

Community Support Team _ Dale
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
5 REPLIES 5
Helper II

Dear Community,

I want to create a simular table but then in Power Query using the m Query language.

Could someone help me with this?

When I use the DAX code in Power BI Desktop, my Desktop file beocomes very slowly:

`Running total size =CALCULATE (    COUNTA (Data [StaffLevelName]),    FILTER ( ALL (Data) , Data [FiscalStartYear] <= MAX (Data [FiscalStartYear])))`

Thank you very much.

Kind regards Louis van Paassen

Microsoft

Best Regards,
Dale

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

Can you post sample data and your measure formula?

---------------------------------------

##### I have a NEW book! DAX Cookbook from Packt
Over 120 DAX Recipes!

Proud to be a Super User!

Frequent Visitor

Heres the DAX:

Running Total Measure = CALCULATE( COUNTA(Data[StaffLevelName]), FILTER(Data,Data[FiscalStartYear] <= MAX(Data[FiscalStartYear])))

Heres Sample Data:

Microsoft

```Running Total Measure =
CALCULATE (
COUNTA ( Data[StaffLevelName] ),
FILTER ( ALL ( Data ), Data[FiscalStartYear] <= MAX ( Data[FiscalStartYear] ) )
)
```

Best Regards,

Dale

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

Announcements