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: 
Lucas_Gatling
Support
Support

Are the 'Before' and 'Above' functions going to evaluate differently if they are using the same expression?

I have a case where a client is using the the same expression in a straight table and a pivot table. The only difference is they are using the 'Above' function in the straight able and the 'Before' function in the pivot table. All other parts of the expression are the same. However, the client is expecting the same numbers be calculated and the actual result is that those numbers are different. I'm just trying to see if this working as designed or if it could be possibly a bug? Here is how the client is using both functions:

-Straight table

Average Movement:

if($(vDemandaPiezasAñoAct),

0,

RangeAvg(Above([Demanda Real / Pronóstico]/$(vDemandaPiezasAñoAnt),1,6))

)

-Pivot Table:

Average Movement:

if($(vDemandaPiezasAñoAct),

0,

RangeAvg(before([Demanda Real / Pronóstico]/$(vDemandaPiezasAñoAnt),1,6))

)

If the issue is solved please mark the answer with Accept as Solution.
6 Replies
vishsaggi
Champion III
Champion III

Above and Below works on single column cell values.

Before and After works multiple columns.

Or is it you are looking for Above and Below ?

Lucas_Gatling
Support
Support
Author

Vish,

The client is using Above and Before. He's trying to do forecasting that is why he is using the Above and Before functions. But he is getting different numbers in the Pivot table for the forecasting Average Movement column and he's expecting the values to be identical in both the Straight table and Pivot table respectively.

If the issue is solved please mark the answer with Accept as Solution.
vishsaggi
Champion III
Champion III

Oh beg your pardon. My bad, will look into it.

sunny_talwar

Seems like a bug and it seems that Straight table is calculating the right numbers compared to the pivot table.

vishsaggi
Champion III
Champion III

No idea why it is doing that. As sunny mentioned could potentially be a bug.

petter
Partner - Champion III
Partner - Champion III

Actually it doesn't have to do with Above() versus Before(). If you change the layout of the pivot table and use Above() in that too it will still show different calculations even though the expression is identical....

So the issue is between how the Straight table is calculating the particular expression versus a Pivot table.

To me the calculation is hard to understand really - could you provide the explanation for the forecast calculation?