Skip to main content

I've built a simple variable with static value. If I enter in the code editor, it shows a value (like 3.05, that is fine), but if I exit, it shows me NULL, and in the analysis it follows the NULL behaviour, creating lots of messes.

 

I don't understand why it is happening, since if I try to fix it, it shows me the correct value.

I can't replace it in the formula of the KPI, since I'm calculating a static QUANTILE value to be compared which every row of a table, if I put it directly in the formula it tells that I can't use aggregation function etc etc...

Hmmm... maybe filters at analysis, tab or component?

Also, maybe you have a problem with the data types?

 

Because I tried and it worked fine:

image 

image 

<%=test2%>

 

TABLE ( 

 DAY("_CEL_SINIESTROS_ACTIVITIES"."EVENTTIME") 

AS "Day(EVENTTIME)"

,

case when DAY("_CEL_SINIESTROS_ACTIVITIES"."EVENTTIME") < 3.05 then 'XXXXX'

else NULL

end 

AS "is less than variable (3.05)"  

) ORDER BY case when DAY("_CEL_SINIESTROS_ACTIVITIES"."EVENTTIME") < 3.05 then 'XXXXX'

else NULL

end

 DESC NOLIMIT;

 

 


I don't think that your test is accurate, you've just put 3.05 as value in the text/replacement variable, instead I need to calculate it using a static variable.

My variable is the calculation of a quantile, if I were using the text/replacement the value would have been something like QUANTILE(BLABLA), not the actual value of the quantile, that now is 3.05, but tomorrow could be 3.08 depending on the daily data ingestion


I don't think that your test is accurate, you've just put 3.05 as value in the text/replacement variable, instead I need to calculate it using a static variable.

My variable is the calculation of a quantile, if I were using the text/replacement the value would have been something like QUANTILE(BLABLA), not the actual value of the quantile, that now is 3.05, but tomorrow could be 3.08 depending on the daily data ingestion

Got it. I think i did that some time ago. I will try to remember

Hey Frederico,

 

did you find a solution for the problem with the static value?

 

I have the same problem.

 

Thank you.

 

Best,

Daniel


Reply