Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago

HR report from Excel to PowerBI

Hi all,

 

I'm 'rebuilding' an Excel report into PowerBI but I'm struggling with the following: HR wants to count the amout of people per month and year that are on contract and the amount of people that get a promotion. Right now I have this overview with formulas:

 

ABCDEFGHIJKLMNOPQR
Pers.nr.Startdate contractEnddate contractTitleSame pers.nr?Promotion?jan-20feb-20mrt-20apr-20mei-20jun-20jul-20aug-20sep-20okt-20nov-20dec-20
1501-01-202030-04-2020Trainee  111100000000
1501-05-2020 ConsultantYesYes000011111111
1601-01-202031-05-2020Consultant  111110000000
1601-06-2020 ConsultantYes 000001111111

 

The columns A - D don't contain formulas, this comes right from the source. The rest of the colums do..

 

E2: IF(A2=A1;"Yes";"")

F2: IF(AND(A2=A1;E2="Yes";D2<>D1);"Yes";"")

G2: IF(AND($B2<=G$1;OR($C2="";$C2>=G$1));1;0)     <-- pulled from G2 - R2

 

I need to get rid of the formulas in the source en 'rebuild' them in PowerBI. So I only have column A - D to rebuild the same result in PowerBI... Hopefully someone can help me with this (for me) braincracker!

 

Kind regards, 

 

Steven

2 Replies

  • Mariusz's avatar
    Mariusz
    Community Champion

    Hi Anonymous 

     

    You can select all the non Year Month columns and click on the small arrow down next to Unpivot Columns and chose Unpivoted Other Columns option.

     this will transform your data so it looks like below, and its easier to aggregate and split month and year.

     

    Best Regards,
    Mariusz

    If this post helps, then please consider Accepting it as the solution.

    Please feel free to connect with me.
    LinkedIn

     

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hi Mariusz ,

       

      That was the way I was using before. Now I'm looking for a way to get the same results without importing column E - R...

       

      Gr. Steven