---
title: "Results of script not showing on Saiku"
url: "https://openforis.support/questions/281/results-of-script-not-showing-on-saiku"
tags: ["calc"]
status: "accepted"
score: 0
answer_count: 10
asked: "2015-06-23T09:54:04"
last_activity: "2017-06-06T17:13:33"
source: "Open Foris Support - Q&A Forum"
license: "Copyright Open Foris, 2026. Some rights reserved under creative commons license."
---

# Results of script not showing on Saiku

Asked by Marcelo on 2015-06-23

Hi Mino,
--on the tutorial database--

I have tried to add the **dbh_classes** using RScript instead of Category type and I am not able to see the results on Saiku. I have saved and executed it and everythinh went fine. I see the results on Calc. But when I open Saiku, it is not there (even though my other calculations appear fine).

entity: tree
variable: dbh_classes

    > tree$dbh_classes <- ifelse( tree$dbh <
    > 10 , 1 ,  ifelse( tree$dbh < 20 , 2 ,
    > ifelse( tree$dbh < 30 , 3 , ifelse(
    > tree$dbh < 40 , 4, 5 )  ) ) );

Do you know what could be the problem?

Best,
Marcelo


## Accepted answer (score 1, by Mino Togna on 2015-06-23)

Link: https://openforis.support/questions/281/results-of-script-not-showing-on-saiku/289

Hi Marcelo,

Did you select any variables in the error settings without adding the error r code? then yes, you get an error.

Mino


## Answer (score 1, by Mino Togna on 2015-06-23)

Link: https://openforis.support/questions/281/results-of-script-not-showing-on-saiku/287

Hi Marcelo,

to add a new category to your data, you must add a new calculation step type category (as your first picture).
The second one, creates a new quantitative variable.

However, in both cases, you should see respectively in Saiku a new Dimension or a new Measure.

After you execute your processing chain from the CALC main page (click the play button in the calculation section of the main  page : ![alt text][1] ,

open saiku, click the refresh button to update the cubes. ![alt text][2]

and then select your cube to visualize the results.

If it doesn't work, please send me via email your collect backup and your calc workspace so that i can check,

Thank you,
Mino


  [1]: http://www.openforis.org/support/upfiles/Screen_Shot_2015-06-23_at_15.51.55.png
  [2]: http://www.openforis.org/support/upfiles/Screen_Shot_2015-06-23_at_15.51.26.png


## Answer (score 0, by Mino Togna on 2015-06-23)

Link: https://openforis.support/questions/281/results-of-script-not-showing-on-saiku/285

Hi Marcelo,

The **calculation step category type** is an **R script**. 

What do you mean by "*I have tried to add the dbh_classes using RScript instead of Category type* " ?

What kind of calculation step did you create instead of Category ?

Or have you tried to refresh the cubes in Saiku ?

Regards,

Mino


## Answer (score 0, by Marcelo on 2015-06-23)

Link: https://openforis.support/questions/281/results-of-script-not-showing-on-saiku/286

Hi Mino,

I know the category type is a R script. However, on Calc, there are two different places to insert the code (Type = R Script and Type = Category). 

Like this:
![alt text][1]

And this:
![alt text][2]

I have tried these different ways because no matter what I do, I cannot get them to show up in Saiku. Execution goes fine, I see the table with the correct values, but when I open Saiku, it does not display.

I have tried refreshing it. These two variables do no appear.

Thanks.
Marcelo
  [1]: http://www.openforis.org/support/upfiles/dbh_interv_1.png
  [2]: http://www.openforis.org/support/upfiles/dbh_classes.png


## Answer (score 0, by Marcelo on 2015-06-23)

Link: https://openforis.support/questions/281/results-of-script-not-showing-on-saiku/288

Thanks Mino,

Do I need the **Error Script** for all variables in order to run the processing chain?
I have been getting the message **HTTP Status 500 - Request processing failed; nested exception is java.lang.NullPointerException**, probably caused by the **CalculateErrorTask**, everytime I run the chain.

Best,
Marcelo


## Answer (score 0, by Marcelo on 2015-06-23)

Link: https://openforis.support/questions/281/results-of-script-not-showing-on-saiku/291

That is it then. I had one of the variables there selected (no idea why).

Problem Found and Solved! Thanks!


## Answer (score 0, by Mino Togna on 2015-06-23)

Link: https://openforis.support/questions/281/results-of-script-not-showing-on-saiku/292

Ok good to know Marcelo.

Please, let me know if you have other issues.

Thanks,

Mino


## Answer (score 0, by phuquy188 on 2016-09-21)

Link: https://openforis.support/questions/281/results-of-script-not-showing-on-saiku/741

I have some problen i need to help? can i get your email?


## Answer (score 0, by joseph on 2017-06-02)

Link: https://openforis.support/questions/281/results-of-script-not-showing-on-saiku/1307

This gives a good idea on the use/making measures(quantitative) and dimensions (categories). Now I made in Collect a code list for the (semi)quantitative Tansley abundancy/frequency decimal scale 0 - 9: to be used (pop up in Saiku) as measures but these are still (regarded) categories. Is there a better way than reading/assigning the codes in Collect in a newly created 'number'column? Could there be a way to assign codes (categories) to be treated as numbers (quantities) in Collect/Calc/Saiku. Hope I am clear, Joseph


## Answer (score 0, by Mino Togna on 2017-06-06)

Link: https://openforis.support/questions/281/results-of-script-not-showing-on-saiku/1311

Hi Joseph,

the more consistent way would be to create a numeric attribute in collect ( you can use calculated attribute if you already have one).

Another way would be to create a qty variable in Calc and assign its value based on the categorical one.

Please let me know if you need more info.

Thank you

Mino
