# Days to close tickets with average as a line

Options
Member

Good morning everyone:

I have just started using Domo and I have been tasked with taking an exec prenintation out of Excel and into Domo.I cannot figure out how to build this chart.

• X - Axis: Date of ticket raised
• Y - Axis: Count of Ticket ID
• Stacked Bar: Grouping of ticket age
• Line: Average ticket age

This is what the current Excel chart looks like:

I have been able to get everything apart from the line to work. I have written the beat mode calculation to group the ticket ages but I cant figure out how to create a series for the line to show average age for the given period.

Could someone please point me in the right direction?

## Best Answer

• Coach
Answer ✓
Options

Do you have a column with the ticket age already calculated or are you doing that as a beastmode?

You could create something like this:

`AVG(DATE_DIFF(`closedate`, `opendate`))`

Put the AVG beastmode calculation as your first value in the 'Y Axis' area. Then create separate beast modes for each of the date ranges and add those beastmodes (making up your stacked bar) one after another in the 'Series' section.

For reference, I have a % change line with two bars on one of my charts, you can see how I broke the series up here:

Hope that helps getting you started.

Let me know if you have any other questions,

Valiant_Ronin

**Please mark "Accept as Solution" if this post solves your problem
**Say "Thanks" by clicking the "heart" in the post that helped you.

## Answers

• Coach
Answer ✓
Options

Do you have a column with the ticket age already calculated or are you doing that as a beastmode?

You could create something like this:

`AVG(DATE_DIFF(`closedate`, `opendate`))`

Put the AVG beastmode calculation as your first value in the 'Y Axis' area. Then create separate beast modes for each of the date ranges and add those beastmodes (making up your stacked bar) one after another in the 'Series' section.

For reference, I have a % change line with two bars on one of my charts, you can see how I broke the series up here:

Hope that helps getting you started.

Let me know if you have any other questions,

Valiant_Ronin

**Please mark "Accept as Solution" if this post solves your problem
**Say "Thanks" by clicking the "heart" in the post that helped you.

• Member
Options

Thanks for the reply Valiant_Robin. It took me a while to get the calculation for the average line to work (still learning the MYSQL syntax) but I now have the chart.

Bonus advantage of your method is that I can order the series in a sensible manner.

This discussion has been closed.