Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Current Year Current Month current date Vs Last Year Same Month same date Data

Hi all,

I need this one

current year current month current date vs last year same month same date  data

means suppose I select the 2014-sep-2 it display the sum of sales and display the same date, same month and last year means 2013-sept-2 date of the sum sales plz tell me urgent.......

9 Replies
arulsettu
Master III
Master III

hi

try this one

sum({<year={$(=max(year))}>}sales)/sum({<year={$(=max(year)-1)}>}sales)

MK_QSL
MVP
MVP

This will give you Sum(Sales) for User Selected Date...

SUM({$<Year = , Month =, Quarter = , Date = {'$(=Max(Date))'}>}Sales)

This will give you Sum(Sales) for User Selected Date but for Last Year.. i.e if user selected 20/09/2014, you will have Sum(Sales) for 20/09/2013...

SUM({$<Year = , Month =, Quarter = , Date = {'$(=Date(AddYears(Max(Date),-1)))'}>}Sales)

ecolomer
Master II
Master II

Here you have an example tothat

Not applicable
Author

Thanks suppose I select this  2014-aug-15 to display the sum and previous year 2014-aug-13 date sum. the condition is apply to this date  its  works or not plz tell me.....urgent 

Not applicable
Author

Thanks suppose I select this 2014-aug-15 to display the sum and previous year 2014-aug-13 date sum. the condition apply to this date its work or not plz tell me.... urgent

MK_QSL
MVP
MVP

SUM({$<Year = , Month =, Quarter = , Date = {'$(=Date(AddYears(Max(Date)-2,-1)))'}>}Sales)

ecolomer
Master II
Master II

Yes, the formula is:

Sum({<YearMonth ={">=$(=Date(addmonths(Max(YearMonth), -12), 'MMM-YY')) <=$(=Date(addmonths(Max(YearMonth), -1),  'MMM-YY'))"} >} Sales)

Not applicable
Author

Hi Manish,

The last year  expression sum({$<year=, month=,Quarter=, date={'$(=date(addyears(max(date),-1)))'}>}sales) is not working plz help me another one.......urgent ..plz

mjayachandran
Creator II
Creator II