cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
redhughes Regular Visitor
Regular Visitor

Starters/leavers - cumulative

Hi,

 

My data set looks similar to this:

Capture2.PNG

 

 

 

 

 

 

This means I can quite easily show starters and leavers per month (both in terms of headcount and hours), and therefore net change. However, I am now thinking of a way to show a cumulative over time, i.e.:

  • on 1/1/18 it'd be 1 (or 40)
  • on 2/1/18 it'd show 2 (77.5)
  • on 3/1/18 it'd show 3 (117.5) and finally
  • on 4/1/18 it'd shows 2 (77.5) again

Any tips on how to model it? What formulas/tables/columns should I be creating? Thanks for all suggestions!

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Starters/leavers - cumulative

Hi @redhughes,

 

You can try to use following measure, I added new conditions on leave date to prevent dax formula calculated on leave employees.

Measure =
CALCULATE (
    SUM ( 'Table'[Hours] ),
    FILTER (
        ALLSELECTED ( 'Table' ),
        'Table'[Start Date] <= MAX ( 'Table'[Start Date] )
            && OR ( [Leave date] = BLANK (), [Leave date] >= MAX ( Table[Start Date] ) )
    )
)

 

Regards,

Xiaoxin Sheng

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



For learning resources/Release notes, please visit: | |

View solution in original post

3 REPLIES 3
themistoklis New Contributor
New Contributor

Re: Starters/leavers - cumulative

@redhughes

 

You can use a formula like the following one:

Cumulative = 
CALCULATE (
    SUM ( 'Table'[Hours] ),
    FILTER( ALL ('Table' ),
    'Table'[Start Date] <= MAX( 'Table'[Start Date] ))
)

See also workspace on this link

redhughes Regular Visitor
Regular Visitor

Re: Starters/leavers - cumulative

thanks @themistoklis, unfortunately this measure doesn't take into account leavers so it keeps adding hours on and on disregarding the fact that someone might have left (and would therefore reduce the number of cumulative hours)

Community Support Team
Community Support Team

Re: Starters/leavers - cumulative

Hi @redhughes,

 

You can try to use following measure, I added new conditions on leave date to prevent dax formula calculated on leave employees.

Measure =
CALCULATE (
    SUM ( 'Table'[Hours] ),
    FILTER (
        ALLSELECTED ( 'Table' ),
        'Table'[Start Date] <= MAX ( 'Table'[Start Date] )
            && OR ( [Leave date] = BLANK (), [Leave date] >= MAX ( Table[Start Date] ) )
    )
)

 

Regards,

Xiaoxin Sheng

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



For learning resources/Release notes, please visit: | |

View solution in original post

Helpful resources

Announcements
New Kudos Received Badges Coming

New Kudos Received Badges Coming

Kudos to you if you earned one of these! Check your inbox for a notification.

Microsoft Implementation for Communities Wins Award

Microsoft Implementation for Communities Wins Award

Learn about the award-winning innovation that was implemented across Microsoft’s Business Applications Communities.

Power Platform World Tour

Power Platform World Tour

Find out where you can attend!

Top Kudoed Authors (Last 30 Days)
Users online (1,615)