Forum Discussion

Ashfaq's avatar
Ashfaq
Regular Visitor
7 years ago

Absent Percentage Per Employee Distribution

Hello,

 

for the argument sake let us assume that we have following data,

 

DertmentCount of EMPIDNo of Days Absent
Department 125114
Department 235108
Department 35570
Department 41061
Department 5949
Department 61448
Department 71045
Department 8942
Department 9835
Department 102034
Department 111533
Department 121029
Department 13528
Department 141127
Department 151525
Department 16424
Department 17622
Department 18417
Department 19417
Department 20816
Department 21715
Department 228

14

 

Now I need to calculate percentage of Employee based their No of Days  absent and Employee distribution.

 

 

3 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Ashfaq,

     

    You can try to use following measure if it works for your scenario:

    Measure =
    VAR _curr =
        CALCULATE (
            SUM ( Table[No of Days Absent] ),
            ALLSELECTED ( Table ),
            VALUES ( Table[DertMent] ),
            VALUES ( Table[EmpID] )
        )
    VAR _total =
        CALCULATE (
            SUM ( Table[No of Days Absent] ),
            ALLSELECTED ( Table ),
            VALUES ( Table[DertMent] )
        )
    RETURN
        DIVIDE ( _curr, _total, -1 )
    

     

    Regards,

    Xiaoxin Sheng

    • Ashfaq's avatar
      Ashfaq
      Regular Visitor

      Anonymous Thankls for your input,

       

      I applied all the steps you explained above, I do get 1 as value foe each department, 

      Wherein I need to distribute them as per Employees and Days absent.

       

       

      • Anonymous's avatar
        Anonymous
        Not applicable

        Hi Ashfaq,


        Can you please share a pbix file with some sample data and expected result for test? In your sample, it only contains summarized records.

         

        Regards,

        Xiaoxin Sheng