Skip to main content
Announcements
Accelerate Your Success: Fuel your data and AI journey with the right services, delivered by our experts. Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
Mathias_Siebenbuerger
Contributor II
Contributor II

Compare Year to Month with previous Year

Hey Everyone!
I'm relatively new to Qlik and want to compare Sales for a certain Fiscal  Period (Year to Month) to the same period from the previous Fiscal Year. For example, if i select August 2022 in the Filter pane, the Text field shoul show the sales from the fiscal year 2022 until August 2022 (in my case, it is the calendar date 8/20/2022) and the same for the previous year where the fiscal month may end an another day (e.g. 8/24/2021).

Mathias_Siebenbuerger_0-1673268086021.png

Currently, it looks like this in the picture. However, the function Date(Addyears -1) only refers to the regular calendar, so 8/31/2021.
Has anyone an idea?
I have a master table which refers the regular calendar to the fiscal calendar. Further fields in this table are [Fiscal Month Value], which is only the fiscal month ('MM'), and [Fiscal Month Caption] in the format: 'MMM-YY'. I already tried to play around with latter. The idea was something like subtract 1 from the year of [Fiscal Month Caption] and return the max(Date), where [Fiscal Month Caption] = [Fiscal Month Caption]-1.

 

Thanks in advance for your help!

Labels (2)
1 Solution

Accepted Solutions
Mathias_Siebenbuerger
Contributor II
Contributor II
Author

Hey, it's me again.
Found a solution, for those who are interested: The idea is to take the max value of the date with the same fiscal month value, but from the previous year. Fortunately, my Fiscal Date table has already a field named [Previous Fiscal Year]

Mathias_Siebenbuerger_0-1673274066877.png

Otherwise, one could also subtract one from the currently selected year value.

Acc. to a german saying, I couldnt see the forest for the trees.

View solution in original post

1 Reply
Mathias_Siebenbuerger
Contributor II
Contributor II
Author

Hey, it's me again.
Found a solution, for those who are interested: The idea is to take the max value of the date with the same fiscal month value, but from the previous year. Fortunately, my Fiscal Date table has already a field named [Previous Fiscal Year]

Mathias_Siebenbuerger_0-1673274066877.png

Otherwise, one could also subtract one from the currently selected year value.

Acc. to a german saying, I couldnt see the forest for the trees.