Skip to main content
Announcements
Introducing a new Enhanced File Management feature in Qlik Cloud! GET THE DETAILS!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Before Function and Bar Graph

Hi Everyone,

I read a lots of articles about this function, but I didn't find a solution to resolve this problem:

I need to show the difference in one dimension, to resolve this task I used the before function, as:

Dimension: Year

Metric 1: sum(sales)

Difference: sum(sales) - before(Metric 1)

When I show this information in a pivot table, it's works ok, but when I try to show this information using a bar graph, Qlikview shows an error message. I don't know why this error happens, or if it's possible to use before function in graph bars.

Thanks a lot for your answers.

Sebas.

2 Replies
Anonymous
Not applicable
Author

Hi Sebastian,

The before() function together with some of the other Inter Record functions only work in Pivot Tables.

Here's an excerpt on the function from the reference manual:

before( [ total ] expression [, offset [,n ]] )
Returns the value of expression evaluated with a pivot table's
dimension values as they appear in the column before the current
column within a row segment in the pivot table. This function
returns NULL in all chart types except pivot tables.

Not applicable
Author

Hi Johannes, What can be used instead of this formula?, I have the same problem. Thanks.