Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Announcements
QlikWorld, June 24-25, 2020. Free virtual event for DI and DA gurus. Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Contributor
Contributor

Month Over Month Sales

I've tried variations of all the formulas I've found on here for month over month, and so far none of it works.  I need to see sales month over month like this, MonthYear, that month's sales, then the previous month's sales in the 3rd column.  Please somebody help me.

17 Replies
Highlighted
Partner
Partner

Re: Month Over Month Sales

your first expression is :

sum(Sales)

add, in the 3rd column : above(sum(Sales)

and see what happens

Highlighted
Contributor
Contributor

Re: Month Over Month Sales

3rd column as: !

peek(sum(Sales))

Highlighted
Partner
Partner

Re: Month Over Month Sales

Peek is a script function; you can't use in the front end; above will replace it in the front end.

Peek can be used for the same purpose as follow, but within the SCRIPT:

QlikView Peek Function

Highlighted
Contributor
Contributor

Re: Month Over Month Sales

I'm just a user, not a developer.  I do not have access to the back end, so I can't create variables, either.  I will try the 1st option, though.

Highlighted
Contributor
Contributor

Re: Month Over Month Sales

"Above" worked.  If I reverse the sort to show most recent month first, do I use "below"?

Highlighted
Contributor
Contributor

Re: Month Over Month Sales

"Above" worked.  Trying "Below" for a reverse sort.

Jodi

Highlighted
Contributor
Contributor

Re: Month Over Month Sales

Below only works so long as I have no filters.  I have an if/then saying if the month below was 0 or null, do this.  Let's say the changeover happened in January 2018.  As soon as I filter on just 2018, there is no below and January doesn't calculate correctly.  Please, I need a formula that will bring me sales data for the previous MonthYear in each line item.

Again , I cannot create variables.

Highlighted
Specialist
Specialist

Re: Month Over Month Sales

Sum({$<Date = {$(=addmonths(Date, -1))}>}Sales)

Highlighted
Contributor
Contributor

Re: Month Over Month Sales

I’m sorry, it’s not working. This is the formula I adapted from your response:

sum({$}GROSS_ACTS_REACTS_UPGRADES)

I’m getting all zeros in that column.