Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago
Solved

Staff Turnover Calculation

Hi 

I am trying to workout staff turnover from this table. Not sure if it's a measure or a calculation.

This is the report I have and need to work out monthly turnover % based on this formula: Leaver/Total*100

 

How am I able to get the turnover % per month showing beneath the Total row?

Any assistance would be appreciated.

 

  • Anonymous's avatar
    Anonymous
    3 years ago

    I realised to activate subtotal rows.

    Got it to work thank you!

3 Replies

  • v-chenwuz-msft's avatar
    v-chenwuz-msft
    Community Support

    Hi Anonymous 

     

    Try this code:

    Measure = 
    IF (
        HASONEVALUE ( 'Table'[Type] ),
        SUM ( 'Table'[Value] ),
        FORMAT (
            DIVIDE (
                CALCULATE ( SUM ( 'Table'[Value] ), 'Table'[Type] = "Leaver" ),
                CALCULATE ( SUM ( 'Table'[Value] ), 'Table'[Type] = "Total" )
            ),
            "0.00%"
        )
    )
    

     


    Pbix in the end you can refer.

    Best Regards

    Community Support Team _ chenwu zhu

     

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

     

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hi I have replaced the values with the new measure and I get this.

      I have replicated your attachment and yet have no turnover% row.

      Not sure why I am not gettting the same view as yours.

      • Anonymous's avatar
        Anonymous
        Not applicable

        I realised to activate subtotal rows.

        Got it to work thank you!