Jump to content

Comparing two genders' headcount percentage change over the years


Miroslav Anbeegod

Recommended Posts

Hi all.

I'm trying to compare two values'headcount change over the years. It's not actually gender, but for explanation's ease, let's say it is.

This is the sameple data:

 

The line graph should show the percentage change of the genders from 2017 to 2020, so the line graph's should give two lines, M and F,like this:

2017: M2 (+0%) F1 (+0%)

2018: M 1(-50%) F2 (+50%)

2019: M 2(+50%) F 2(+0%)

2020: M 1(-50%) F2 (+0%)

 

However, in the line graph that I work on, it couldn't show both the number and the percentage. To make it worse, it calculates the percentage based onthe whole population, instead of just the gender:

2017: M (0%) F (0%)

2018: M (-33%) F (+33%)

2019: M (+33%) F (0%)

2020: M (-25%) F (0%)

 

The questions are:

1. How to separate the calculation of the two genders

2. How to show both number and percentage change, and the line graph is drawn based on the number

 

Thanks.

Link to comment
Share on other sites

In your line chart use the 'line by'/'color by' option to break down the genders:so line by / color by -> gender.

On the x-axis use time and on the y-axis use 'head count' and as aggregation method 'Difference over year' or'Difference % over year'. Spotfire will edit the resulting expression for you ;) There are lots of pre-defined aggregation methods to track changes over given periods. Explore!

Your table needs some correction:

2017: M2 (+0%) F1 (+0%)

2018: M 1(-50%) F2 (+100%) because you go from 1 -> 2

2019: M 2(+100%) F 2(+0%) because you go from 1 -> 2

2020: M 1(-50%) F2 (+0%)

Link to comment
Share on other sites

I have a follow-up question.

The real data is this

 

However, when comparing the difference, the graph shows that-28 (111-139) is an increase from -88 (139-227), but in reality the line would have gone down like in the real data line, because it's still a decrease and wouldn't have caused it to go up like in the difference line.

 

Is it possible to show the line according to the real numbers, but display the difference in label

 

Thanks.

Link to comment
Share on other sites

Be careful how you interpret the line. It just shows you that you have an increasing trend from -88 to -28. But you still have negative growth of 28.

 

It might be better practice to show changes over periods in bar chart rather than in a line chart.

 

Instead of using the difference in periods as labels in a line chart I suggest to use a combination chart where you plot the overall trend with total numbers as a line and the change over periods as bars. 

 

So put both on the y-axis and the click on the little bar icon in the legend of the visualization to change the overall trend to a line chart.

 

If it gets to confusing with both genders in one graph use the trellis option by gender.

 

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...