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

Alternative of above() at front end

Hi All,

there is a table having following data:

MonthSales
110
220
330
440
550
660
770
880
990
10100
11110
12120

Now , I want to calculate at front end, value of sales for current month minus value of sales for previous month.

It is achieved using above() but I wanted to know is it possible to calculate this at front end without  using above function.

1 Solution

Accepted Solutions
preminqlik
Specialist II
Specialist II

Hi there,

find attachment..

View solution in original post

7 Replies
Anonymous
Not applicable
Author

Sure is possible.

Look at the peek() & previous() functions.

simenkg
Specialist
Specialist

Hi Srashti.


We calculate the change in the script as Sales - Previous(Sales) as Delta. Then the blue column will simply become sum(Delta)

look at the attached qvw

Regards
SKG

Not applicable
Author

Thanks Bill and Simen . But I need to calculate this at the front end. not in the script.

jagan
Luminary Alumni
Luminary Alumni

Hi,

I think there is no other alternative other than Above() in front end, you have to go with Above.

Regards,

Jagan.

jonathandienst
Partner - Champion III
Partner - Champion III

Srashti Srivastava wrote:

It is achieved using above() but I wanted to know is it possible to calculate this at front end without  using above function.

Yes, that is how it is done correctly. Do you have some reason to do it differently?

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
preminqlik
Specialist II
Specialist II

Hi there,

find attachment..

vadimtsushko
Partner - Creator III
Partner - Creator III

Hi Srashti.

How to trend Current Sales vs Prev Sales, using date as dimension? problem looks similiar to your's.

Look at that discussion. Basically you can solve it by creating special sort of calendar. Good description of that method is at  Calendar with flags making set analysis so very simple