Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Problem with comparing same dates last year

I need to be able to choose a variety of dates and then show the equivalent dates for previous years (ie minus 364 days).

I want to be able to show a single table with the current years data and a separate table for the previous years data.

Can someone please provide me with a suggestion to do this.

Thanks

Leigh-Anne

3 Replies
Not applicable
Author

Hi,

If you are using QV11, you can read more on alternate states. If you are using previuos versions, you need to detatch one table to do comparative analysis.

Regards,

Xue Bin

jvitantonio
Specialist III
Specialist III

=date(DateField-365,'DD/MM/YYYY')

jonathandienst
Partner - Champion III
Partner - Champion III

Hi

Do you want to show the dates for the previous year or the data for those dates? Assuming its the latter:

table1:   Dimension: Date

             Expression: Sum({<Date = {">=$(=YearStart(Date))"}> Amount) 

table2:   Dimension: Date

              Expression: Sum({<Date = {">=$(=YearStart(Date, -1)) <$(=YearStart(Date))"}>} Amount)

If you create a year field in your load script, then its easier:

          Sum({<Year= {"$(=Max(Year))"}> Amount) 

          Sum({<Year= {"$(=Max(Year)-1)"}> Amount) 

Hope that helps

Jonathan

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein