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

Announcements
Q&A with Qlik - Qlik Cloud Migration: Questions about migrating to Qlik Cloud? Catch the latest replay!
cancel
Showing results for 
Search instead for 
Did you mean: 
nareshthavidishetty
Creator III
Creator III

month on moth sales calculation

hi im new to qlikview

im struck with following expression

month on month sales,year on year sales comparison

Labels (1)
1 Solution

Accepted Solutions
maxgro
MVP
MVP


you can start adding some useful fields (ie in a master calendar) to your doc

     d,                                                         // date

     year(d) as y,                                         // year

     year(d)*12 + month(d) as mserial            // month serial

then with set analysis (v = sales)

sum({$ <y={$(=max(y))}>} v)                              // sales max year

sum({$ <y={$(=max(y)-1)}>} v)                           // previous

sum({$ <mserial={$(=max(mserial))}>} v)            // sales max month

sum({$ <mserial={$(=max(mserial)-1)}>} v)         // previous

or you can post your qlik doc (.qvw) here

View solution in original post

3 Replies
Qrishna
Master
Master

Hi Naresh,

could you please be more specific as what exactly your scenario is? and what exactly you are looking for.

Thanks

maxgro
MVP
MVP


you can start adding some useful fields (ie in a master calendar) to your doc

     d,                                                         // date

     year(d) as y,                                         // year

     year(d)*12 + month(d) as mserial            // month serial

then with set analysis (v = sales)

sum({$ <y={$(=max(y))}>} v)                              // sales max year

sum({$ <y={$(=max(y)-1)}>} v)                           // previous

sum({$ <mserial={$(=max(mserial))}>} v)            // sales max month

sum({$ <mserial={$(=max(mserial)-1)}>} v)         // previous

or you can post your qlik doc (.qvw) here

nareshthavidishetty
Creator III
Creator III
Author

thanks