That’s a super fast response. Wasn’t expecting that!
Database
https://www.dropbox.com/s/u5rgvntki2ku83o/test_historical_membership.sql?dl=0
The chart I’m looking to create shows the number of members of a club for each year. There are several membership types which should be stacked for each year.
SELECT club_year, COUNT(*) AS count FROM test_historical_membership WHERE type = 1 GROUP BY club_year ;
SELECT club_year, COUNT(*) AS count FROM test_historical_membership WHERE type = 2 GROUP BY club_year ;
SELECT club_year, COUNT(*) AS count FROM test_historical_membership WHERE type = 3 GROUP BY club_year ;
SELECT club_year, COUNT(*) AS count FROM test_historical_membership WHERE type = 4 GROUP BY club_year ;
SELECT club_year, COUNT(*) AS count FROM test_historical_membership WHERE type = 6 GROUP BY club_year ;
SELECT club_year, COUNT(*) AS count FROM test_historical_membership WHERE type = 7 GROUP BY club_year
Label for X axis: Club Year
SQL field name of X axis: club_year
Label for Y axis: 1;2;3;4;6;7
SQL field name of Y axis: count
https://www.dropbox.com/s/sf93he04y2dij8g/chart_1.JPG?dl=0
https://www.dropbox.com/s/2czrx77bn9g9dze/chart_2.JPG?dl=0
https://www.dropbox.com/s/ri1rmcp2oe0mp38/chart_3.JPG?dl=0
As you see from this chart all the data sets start from 0,0 rather than being linked to the Y axis. I tried the various options in
Force start X axes at 0 Force start X axes at 0
Show only round numbers in Y axis ticks Disable “stackedness” for datasets
but these settings made no difference.
You’ll also notice that I’ve not included (membership_type = 5)
SELECT club_year, COUNT(*) AS count FROM test_historical_membership WHERE type = 5 GROUP BY club_year ;
As this returns 0 results which stops the whole graph from showing. I can work around this so not an issue, just an info for you.
Many many thanks for your help with this!!!