Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
retretrt
Contributor II
Contributor II

Year over Year comparison with two lines

I have a line chart with a measure showing cumulative Sales and data period covering 2022 and 2023. Wish to show this as a year over year comparison. To this end, I use the function DayNumberOfYear(mydate) and Year(mydate) as dimensions. This gives me the Year-lines on on top of each other and comparable, which is what I want.

However, the x-axis for DayNumberofYear is uninformative, in the sense that it does not immediately tell you the month or date of the year you are looking at (see attached PNG).

How can I convert day numbers of year to regular dates so that I get a time-series which simply lists 1.1 to 31.12 (without specifying a year), rather than listing the days as numbers

Labels (2)
1 Reply
vincent_ardiet_
Specialist
Specialist

You could maybe try to replace DayNumberOfYear(mydate) with:
=dual(Date(YearStart(Today())+DayNumberOfYear(mydate)-1,'DD-MMM'),DayNumberOfYear(mydate))