3

I am looking for a way to do a year-over-year line chart for comparing values at the same time frame (day/week/month) compared to the previous year. When looking for examples I am seeing a lot of line charts with an x-axis with values looking like "MM YYYY". What I am trying to do is to create a chart with an x-axis with values looking like "MM" and then different colored lines representing those values at a different year. Below is an example from Tableau...I am wondering if I can create something like this in Quicksight

YoY Tableau

2 Answers2

1

Of course, you can. Pick a line chart on the visualize panel and on the fields well add the year in the color enter image description here

The result will be something like this

enter image description here

johnzarifis
  • 362
  • 1
  • 4
  • This is a good solution. Though, one thing I was hoping for was to keep my x-axis as a date value rather than simply the month integer. The scroll bar on the x-axis is very nice to use with dates because it zooms between the month/week/day levels. Is there a way to do this while keeping the x-axis as a date value? – Bradley Pettman Aug 13 '21 at 13:43
  • Yes with a date field in the x axis and you can choose to format it as you like. Just I had a month integer field handy in order to show you how to do it. – johnzarifis Aug 13 '21 at 19:54
  • @johnzarifis Do you mind sharing more information about how your fields are designed? Maybe show a table representation of the same visual. – Ivar Eriksson Jan 27 '22 at 10:49
0

Reply To: Ivar Eriksson Was able to get the YoY plot by adding calculated fields for Month=substring(toString(),6,2) Year=substring(toString(),0,5)

Reply To: There is a hack suggested to the X-Axis in DateFormat rather than the integer month. Please refer https://repost.aws/questions/QUuKTyrb-5RWaZ1diIBSlj4g/how-to-make-a-year-over-year-line-chart-in-quick-sight

  • As it’s currently written, your answer is unclear. Please [edit] to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community May 11 '22 at 05:48