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

Month on Month % calculation

Hi,

We need to do a month on month % calculation.

Logic: 2017 sales-2018 sales/2018sales

I need to get this in front end expression.

Please let me know how to get this.

Attached is the sample datasource.

Thanks..

10 Replies
Anonymous
Not applicable

Hi,

Perhaps the following will give a good start:Current Years Current Month Vs Last Year Same Month Data

nareshthavidishetty
Creator III
Creator III
Author

Please share the logic.I have tried but its not working.

Thanks..

niclaz79
Partner - Creator III
Partner - Creator III

(Sum({<Year = {$(=Max(Year)-1)}>}sales)-Sum(sales) ) / Sum(sales)

Works, considering you have a selected year (2018 for instance) and month.

nareshthavidishetty
Creator III
Creator III
Author

Hi,

Please find below .

I need to show some thing like this.

Capture.PNG

Thanks..

niclaz79
Partner - Creator III
Partner - Creator III

Hi,

Using your example data and

Dimension : Month

Expression 1: Sum(Sales)

Expression 2: (Sum(Sales) - Sum({<Year = $(=Max(Year)-1)>}Sales)  )/ Sum(Sales)

Selection: Year = 2018

I get this:

Final.png

nareshthavidishetty
Creator III
Creator III
Author

Hi,

I need to show with out selection.

Thanks..

vishalarote
Partner - Creator II
Partner - Creator II

Capture4.PNG

Try this Expression

(sum({<Year={'2017'}>}Sales)-sum({<Year={'2018'}>}Sales))/sum({<Year={'2018'}>}Sales)


vishalarote
Partner - Creator II
Partner - Creator II

Some Changes Above Expression PFA

e.g SC:

Capture6.PNG

vishalarote
Partner - Creator II
Partner - Creator II

Sorry by Mistake i am Sending Empty QVW

PFA