Count snapshot data (for HR Turnover)

svetlana
svetlana ⚪️
edited January 14 in New to Domo

I am trying to find a way to count number of rows per month (spanning over 3 years and counting) to get the total number employees for each month in variable form.

The data structure is set in a way that the number of rows should be equal to the number of active employees as of a certain snapshot date.

I am not sure if I should do this in ETL or Beastmode and how!

Would greatly appreciate any advice :)

Tagged:

Answers

  • Ashleigh
    Ashleigh Florida 🟣

    @svetlana definitely recommend ETL. Assuming you have some sort of date field you can use a formula tile to find the month and then use a group by to count the number of rows (you will need some sort of unique identifier so if you have employee ID or email that should work). Can you give an example of how your data is structured?

  • svetlana
    svetlana ⚪️
    edited January 14

    I hope I can explain this well enough...

    The data is structured in a way that for the last day of each month I have ALL active employees in a form of a row per employee; for example, for Dec' 31st - I have 2690 rows [with employee IDs] which represent the 2690 active employees as of that date. The number will, of course, be different for Sep' 30th.

    So I need the end result to be the count of employees per month.

  • Ashleigh
    Ashleigh Florida 🟣

    @svetlana do you have something in each row that uniquely identifies an employee? Like an ID or email? If so you can just do a group by and choose to group by date and count distinct on that unique field.

    If you don't have a unique field you could add in a rank & window tile to give you the row number and then count by that field.

  • Ashleigh
    Ashleigh Florida 🟣

    Group by should look something like this


  • First of all, THANK you so much for the quick replies.

    The good news is that I think it worked! The bad news is that all of the other columns disappeared from the resulting dataset. How can I get them back??

  • Hi @svetlana you can add back the columns you want by selecting "Add Columns" in the group by tile in ETL.

    Alternatively, you should be able to do all this in a card without an ETL. All you need to do is create a card that includes your snapshot date graphed by month and a count of employee name/id. That way it's more flexible for you to filter and drill to the detail.


  • Thank you MichelleH! I need this as a variable to use in turnover calculations so I will use your advice to add back the columns :)

  • I just tried adding back the columns by selecting "Add Columns" in the group by tile in ETL but I don't really see an option to do that (I can just add aggregated columns). I also tried using a separate tile ("Select Columns") but it only showed the two from the "Group By" tile. Any advice?