0

I am trying to make a year-over-year line chart in QuickSight just like in this post. I have (to my knowledge) done the same thing but I have an issue with my chart not "wrapping", see picture below. The week number comes out right as you can see at the right of the x-axis but the x-axis itself doesn't go from 1-52 but rather from 23-52-1-3. I am very new to QuickSight so I don't really understand why this is happening or how to remedy it, do you?

The appropriate field wells look like below and the date variables are made from a "regular" date with the built in truncDate to extract the week numbers. The original post doesn't explain the structure of their field wells unfortunately.

enter image description here

enter image description here

Ivar Eriksson
  • 863
  • 1
  • 15
  • 30

1 Answers1

1

Add a new field called WEEK_NUMBER as follows:

  dateDiff(
    truncDate('YYYY', {otd_event_date}), 
    {otd_event_date},
    'WK'
  )

Then use this new WEEK_NUMBER field in the x axis field well.

darcoli
  • 411
  • 3
  • 5
  • We came up with an alternative solution that added the week number in the original table but this would probably work as well. Thanks! – Ivar Eriksson Jan 31 '22 at 14:03