SELECT
CONCAT(Year, ' ', Month) AS "Month",
`Plan 1`,
`Plan 2`,
`Plan 3`,
`All Plans`
FROM (
select year(event_date) as "Year", Monthname(event_date) as "Month",
sum(if(plan_id = 1,1,0)) as "Plan 1",
sum(if(plan_id = 2,1,0)) as "Plan 2",
sum(if(plan_id = 3,1,0)) as "Plan 3",
sum(if(plan_id in(1,2,3),1,0)) as "All Plans",
FROM `XX`.`XX`
where event_type = "create"
group by 1,2
order by 1 desc, month(event_date) desc
) formatting
Perhaps this was just you copying into the question, but don't split dateFormat across 2 lines.
Yea the code is "dateFormat=yyyy MMMM"...think the copy & paste here wrapped it.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Create a chart macro example with with just a row or 2 of regular data copy/pasted from the sql to show a simple version of your problem so it can be reproduced easily.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Problem fixed. Your initial hunch was right. There was a line break in dateFormat. But, in the Confluence editor, it was appearing as a space, so it wasn't clear there was a line break.
The text editor here picked it up, but I thought that was just text box wrap.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.