Forum Discussion

Michalison's avatar
Michalison
Helper II
4 years ago
Solved

Absence KPIs

I am doing a dashboard that has 2 tables the personnel table which has a staff number column and Absence table which also has a staff number column - I have created a realtionship from personnel tabl...
  • Anonymous's avatar
    Anonymous
    4 years ago

    Hi Michalison ,

     

    I made a sample according to the description with four tables which are personnel table,department table,absence table and calendar table.

    Relationship.

    Then try this measure.

     

    Absence KPIs = 
    VAR _KPIS = COUNTROWS ( 'absence table' ) / COUNTROWS ( 'personnel table' )
    RETURN
    IF(_KPIS = BLANK(),0,_KPIS)

     

    The result should be like this and slicer also works fine.

     

    Also, attached the pbix file as the reference.

     

    Best Regards,

    Community Support Team_Gao

     

    If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

  • Michalison's avatar
    Michalison
    4 years ago

    Thank you so much for your help this has worked