Jump to content

BarChart with multiple bars per grouping


jvway

Recommended Posts

Hi all,

I'm a bit stumped here.  I need to achieve a horizontal bar chart the has a set of three bars per grouping.  So it looks something like below.  I've got a query (shown below) that creates the counts but I now want to separate by months for the quarter.  Are these separate data set items or somehow done in the category or value segments. 

Thanks for whatever help.

          _________________

Oct    ___________________

         ________________

 

          _____________

Nov    ___________________

         ________________

 


Code:
SELECT  X.TradeShow_Converted,  X.TradeShow_New,  X.Campaign_Converted,  X.Campaign_New,  X.ColdCall_Converted,  X.ColdCall_New,  X.Seminar_Converted,  X.Seminar_NewFROM (  SELECT     (select count(*) from leads where lead_source =  'Trade Show' AND status = 'Converted' Group by month(DATE_FORMAT(leads.`date_modified`,"%Y-%m-%d")) as TradeShow_Converted,     (select count(*) from leads where lead_source =  'Trade Show' AND status = 'New') as TradeShow_New,     (select count(*) from leads where lead_source =  'Campaign' AND status = 'Converted') as Campaign_Converted,     (select count(*) from leads where lead_source =  'Campaign' AND status = 'New') as Campaign_New,     (select count(*) from leads where lead_source =  'Cold Call' AND status = 'Converted') as ColdCall_Converted,     (select count(*) from leads where lead_source =  'Cold Call' AND status = 'New') as ColdCall_New,     (select count(*) from leads where lead_source =  'Seminar' AND status = 'Converted') as Seminar_Converted,     (select count(*) from leads where lead_source =  'Seminar' AND status = 'New') as Seminar_New) AS X
Link to comment
Share on other sites

  • 4 weeks later...
  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

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...