Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
amithmurali
Partner - Creator II
Partner - Creator II

Previous Year, YoY Analysis ( Year to Year )

Hi guys,

i have a problem. i want to compare YOY revenue in my dashboard. but when i do the comparison, for example, if i have data till may of 2015. it is comparing with the entire revenue for 2014. i dont want like that. i want to compare till 2014 may only when i comparing 2015 may. i am sending you the table and code which i have used. please help me.

DateRevenue
12-jan-2014123234
3-feb-2014234234
       :      :
      :      :

1-jan-2015

1212313
1-feb-2015334341
1-mar-2015423424
1-april-20153434321
1-may-201523432423

"=sum({<Year = {$(=max(Year))}>}(Revenue))/sum({<Year = {$(=max(Year)-1)}>}(Revenue))"

I am using Universal Calender for the tables.

2 Replies
maxgro
MVP
MVP

this should help

Year-over-Year Comparisons

ankitbisht01
Creator
Creator

Hi Amith, There is more then one possible way, describing one over here. Logic is.(This will work on your selection of year).

1. For current Year you just need = sum(revenue)

2. Previous month revenue according to current year Dates  = sum({<Year={'$(=max(Year)-1)'},Date={">=$(vPYMinDate)<=$(vPYMaxDate)"}>}Revenue).

3. You can find these variables in application.

4. here attached solution qvw on your data .PFA

Regards

Ankit