Adding Data Sets To Charts

When adding data sets to charts, does each data set need a query? For instance, do I need a data set for each year if I am adding a line graph for each year of income totals?

What I have so far is one line that uses this query:

SELECT month(service_date) as “month”, sum(service_price) as TotalAmount
FROM service
WHERE year(service_date) = :P1
AND service_price > 0
GROUP BY month(service_date)
ORDER BY month ASC

:P1 = 2022

If I want to add another line showing the income totals for year(service_date) = 2021, would this be considered another data set?

Community Page
Last updated: