cancel
Showing results for
Did you mean:

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Regular Visitor

## running total

I need a running total organisation body count for a Human Resources Report.

I have an employee name, date started and end date.

If an employee end date column is blank they are a current employee.

If I attribute a "1" to an employee with a start date and "-1" to an emplyee with a end date i can calculate the current body count.

What I can't figure out is a running total to watch the total body count fluctuate over time.

Any help would be appreciated !

1 ACCEPTED SOLUTION
Super User

Hi,

Hope this helps.

Regards,
Ashish Mathur
http://www.ashishmathur.com
6 REPLIES 6
Super User

Refer

https://community.powerbi.com/t5/Desktop/Calculating-a-monthly-employee-count-from-a-start-and-end-d...

Appreciate your Kudos. In case, this is the solution you are looking for, mark it as the Solution. In case it does not help, please provide additional information and mark me with @
Thanks.

My Recent Blog - https://community.powerbi.com/t5/Community-Blog/Comparing-Data-Across-Date-Ranges/ba-p/823601

Helper I

Hi

Still not resolved, please assist. thanks

Can you explain how to do a cumulative or running sum of counts of text data between selected dates. For instance, I have multiple years of data by years and months. The data includes a column containing text, say “M”, “L” etc…. I need to draw a chart showing both counts and running counts by months. And use a slicer to select a year, once I select a specific year then I should be able to visualize the counts and running counts of text of the selected year. So running counts should be for a selected time say a year, we may use Min and Max date var for a selected year.

Super User

Hi,

I answered a similar question of yours here.  Did that not work?

Regards,
Ashish Mathur
http://www.ashishmathur.com
Helper I

Thanks Ashish,

I managed to resolve by creating a Quick Measure from the variable of counts, for example, below DAX

Running count in Year =
CALCULATE(
COUNTA('data1'[level]),
FILTER(
ALLSELECTED('data1'[Year]),
ISONORAFTER('data1'[Year], MAX('data1'[Year]), DESC)
)
)
Regular Visitor

@amitchandak thanks for this. Although I'm still trying to create a cumulative total such as the right hand column in the below example:

 name start date end date start count end count count total cumulative total bob 1/01/2018 1 0 1 1 john 1/01/2018 1/05/2018 1 -1 0 1 bill 1/03/2018 1 0 1 2 fred 1/05/2018 1 0 1 3 sam 1/05/2018 1/05/2018 1 -1 0 3 david 1/02/2019 1 0 1 4 tony 1/03/2019 1 0 1 5 jane 1/05/2019 1 0 1 6 8 -2 6

Super User

Hi,

Hope this helps.

Regards,
Ashish Mathur
http://www.ashishmathur.com

Announcements

#### Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.