Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Why sum(distinct fabs($(Var) -([Variable]))) = ERROR ?

Hellow, I think you will help me.

I Have in pivot table : sum( distinct fabs ( $(Var) - ([Variable]) ) ) = error , { Var = avg( [Variable] ) } ;
sum( distinct fabs ( avg( [Variable] ) - ([Variable]) ) ) = error

But : sum(distinct fabs(4.44 -([Variable]))) = all right

WHY ??????

4 Replies
Miguel_Angel_Baeyens

Hello,

How did you create that variable? Try not using dollar expansion

sum(distinct fabs(var -([Variable])))


Hope that helps

Not applicable
Author

Variable I create through the "Variable Overview".

Without '$' not work.

Miguel_Angel_Baeyens

Just for testing purposes, create a new text object and write

=$(Var)


and likewise without $(). In the first case, it should return the result of the formula (avg([Variable])) in a numeric format and in the second, the formula itself. Is that right?

Not applicable
Author

Thank you for your help, I solved the problem, considering a "avg(Variable)" in the script.