Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Frank_Hartmann
Master II

above function

hi guys, i have the following problem: I have a chart with month as dimension and the following expression in the set analysis:

= if(isnull($(vRQ)),above($(vRQ)),$(vRQ))

If there is a missing value in month, the "above" function fills in the value of the above month  instead. But now i have a Problem if there are two missing values in a role. So i want both missing values to be replaced with the last known value. Here the above function is not working. Any ideas?

1 Solution

Accepted Solutions
swuehl
MVP

You can check for the second last row using above() with an offset argument, and add this check to your logic, but this will be quite painful if you want to extend the logic to three, four, five ... missing values in a row.

= if(isnull($(vRQ)), if(isnull(above($(vRQ))), above($(vRQ),2),above($(vRQ)) ),$(vRQ))

It might be better to handle this in the script, by using peek() function and creating a new column that takes care of missing values.

View solution in original post

2 Replies
swuehl
MVP

You can check for the second last row using above() with an offset argument, and add this check to your logic, but this will be quite painful if you want to extend the logic to three, four, five ... missing values in a row.

= if(isnull($(vRQ)), if(isnull(above($(vRQ))), above($(vRQ),2),above($(vRQ)) ),$(vRQ))

It might be better to handle this in the script, by using peek() function and creating a new column that takes care of missing values.

Frank_Hartmann
Master II
Author

vielen Dank 🙂