Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago
Solved

Headcount Changes in Waterfall Chart

I'm trying to create a Waterfall visual that shows

  • Hires and re-hires as "Increases"
  • Terminations and retirements as "Decreases"

 

My source data is an Excel spreadsheet showing the names of employees who have been HIRED, RE-HIRED, TERMINATED, OR RETIRED over that past 12 months.

 

Is there a simple way to tell Power BI to treat the HIRES AND RE-HIRES as Increases, and the TERMINATIONS AND RETIREMENTS as Decreases?

 

I've searched in the Power BI Community for solutions on this topic.  Thanks in advance for any assistance you can lend.

  • Anonymous's avatar
    Anonymous
    7 years ago

    Thank you for responding.

     

    I found another way that works as well:

     

    • Edit Queries
    • Add Column Tab
    • Add Conditional Column
    • Name the new column Headcount Change
    • Tell the formula to treat Hires and Rehires as 1
    • Tell the formula to treat Terminations and Retirements as -1
    • Close and apply
    • In the Report page, click on the Waterfall chart to Sort by Headcount Change

     

2 Replies

  • You could add a measure to sum the amounts with the correct sign.

     

    Headcount Change = SUMX( 'Headcount Changes' , IF ( 'Headcount Changes'[Type] IN {"Hire", "Re-Hire"},1,-1))
    • Anonymous's avatar
      Anonymous
      Not applicable

      Thank you for responding.

       

      I found another way that works as well:

       

      • Edit Queries
      • Add Column Tab
      • Add Conditional Column
      • Name the new column Headcount Change
      • Tell the formula to treat Hires and Rehires as 1
      • Tell the formula to treat Terminations and Retirements as -1
      • Close and apply
      • In the Report page, click on the Waterfall chart to Sort by Headcount Change