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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
deepakqlikview_123
Specialist
Specialist

Showing curret years data for previous year for same date

Hi All,

My date is DD-MM-YYYY format, as per requirement i want to  show current years data for same date for previous year.

Please suggest.

Attached is sample application for the same.

Thanks

6 Replies
senpradip007
Specialist III
Specialist III

If the date is 27-04-2015 then try like

Sum({<YEAR, MONTH, DATE={">=$(=Date(AddYears(Max(DATE), -1),'DD-MM-YYYY')) <=$(=Date(Max(DATE),'DD-MM-YYYY'))"}>} [YOUR FIELD])

deepakqlikview_123
Specialist
Specialist
Author

Hi Pradip,

This is not working.

Thanks

Not applicable

Try This,

=sum({$<Date = {"$(=AddYears(max(Date),-1))"},Month=>}Amount)

ankitaag
Partner - Creator III
Partner - Creator III

Hi Deepak,

Can you please explain what you exactly want? What should be in your dimension?

ankitaag
Partner - Creator III
Partner - Creator III

Hi Elakkian,

Please note that in your expression you are comparig an Year with a Date..which is wrong

Year(Max(Date))-1 will give you Year and not Date

ankitaag
Partner - Creator III
Partner - Creator III

Hi Deepak,

You can store

=Date(AddYears('25-04-2014',-1))

in a variable and then use it,

but again I would like to know what exactly data you are looking for.

Give some sample data and your descriptive requirements.