Comparing different years in one graph from one data source

Yes, it may be done but you will have to reformat the data so that the year is not present. So get the data, say by month for each year, and then reformat to remove year, and when you chart it will see the value by month and plot 2 graphs by month of the year.

What you want is a year-on-year comparison by either, month, quarter, week of year etc.

I would suggest you also use the Infinity data source to do this but whaq you are asking is not new.

You could do 2 queries one for each year and then join them by month of year for example.

If you do a single query for 2 years then you must reformat the date to remove years and without year the data will appear as an effective join.

see:
Compare SQL Charts To Previous Period | datapine.
How To Compare Different Periods With Time Charts Via SQL | datapine

1 Like