I want to be able to achieve a line graph overlaying 2 types of events " Incidents" & Planned Event

 I want to be able to achieve a line graph overlaying 2 types of events " Incidents" & "Planned Events" and plot Dates down here.  

The way I have it setup and the only way I can figure it out is to have the "incidents" I am counting by Month for the X axis. But it is a range of incidents that span 2022 and 2023 here and I am not able to separate them out the way I am grabbing the metrics sheet info?

In other words, The months are displaying a combination of 2022 and 2023 dates together.

What can I do? I seem to be able to make a Report look the way I want it to, [Example 2] seems to summarize it fine, but I can't seem to use that report to plot it the way I am trying.



Answers

  • Genevieve P.
    Genevieve P. Employee Admin

    Hi @messierr

    Charts can only grab the first level of Grouping & Summary from a Report.

    This means that since you have the Year with the Count as the first grouping, it can pull that data, but it won't be able to break it down by Month and Year.

    If you want lines to overlap, you'll want to build this out in a sheet instead of a Report. This is because to have the same x-axis value (e.g. "January") but different years overlayed, you'll need the months listed down one column and each year as its own separate column next to it. Does that make sense?

    For example, in your current COUNTIFS for all time you're simply counting by the Month. In a new 2022 column, try counting both by the month and the Year (assuming you have a date column in your source sheet to reference):

    =COUNTIFS({crcinc_entrytype}, "Incident", {crcinc_Month}, Label@row, {crcinc_DateColumn}, IFERROR(YEAR(@cell), "") = 2022)

    Or if you have a helper column in your source sheet that's pulling out the year from a date and displaying it as a number, you could try this:

    =COUNTIFS({crcinc_entrytype}, "Incident", {crcinc_Month}, Label@row, {crcinc_Year}, 2022)

    Let me know if this makes sense and points you in the right direction!

    Cheers,

    Genevieve

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!