Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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?
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.
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.
vielen Dank 🙂