Qlik Community

QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

amithmurali
Contributor

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
MVP
MVP

Re: Previous Year, YoY Analysis ( Year to Year )

this should help

Year-over-Year Comparisons

ankitbisht01
Contributor

Re: Previous Year, YoY Analysis ( Year to Year )

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

Community Browser