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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Adding a Variable in Script

Hey!

I have the following script:

Offset_in_Hub=0.1


Verteilung_Verschoben:
Crosstable (Linie_niO_Verschoben, Wert_niO_Verschoben, 1)
LOAD Datum,
     L_Z1V1,
     L_Z1V2,
     L_Z2V1,
     L_Z2V2,
     L_Z3V1,
     L_Z3V2,
     L_Z4V1,
     L_Z4V2,
     L_Z1V1+Offset_in_Hub,
     L_Z1V2+Offset_in_Hub,
     L_Z2V1+Offset_in_Hub,
     L_Z2V2+Offset_in_Hub,
     L_Z3V1+Offset_in_Hub,
     L_Z3V2+Offset_in_Hub,
     L_Z4V1+Offset_in_Hub,
     L_Z4V2+Offset_in_Hub
    
FROM
[aktuell_SPC_Daten.xlsx]
(ooxml, embedded labels, table is Iprozer);

The thing is that Qlikview doesn't understand that "Offset_in_Hub" is a Variable that I just defined. It works when I write a constant (like 0.1) instead of my variable, but this Offset must be variable with a Inputbox.

Thank you very much!!!

Eduardo

1 Solution

Accepted Solutions
Not applicable
Author

Finally I put the offset in the dimension and it worked as I wanted!

Eduardo

View solution in original post

5 Replies
Anonymous
Not applicable
Author

Try:

SET Offset_in_Hub=0.1;

Anonymous
Not applicable
Author

And call it using $(Offset_in_Hub)

Not applicable
Author

Thank you vey much Johannes! It works perfectly. But I just realized that even if I change the value of "Offset_in_Hub" with an Inputbox, my data doesnt change till I run the skript again.

What I plot the following chart with these datas:

Dimension: =Class(Wert_niO_Verschoben, 0.001)

Expression: =Count(Wert_niO_Verschoben)

Can you please help me??

Thank you!!

Eduardo

Not applicable
Author

Thank you for your help but it doesnt work...

What I plot are Gauss bells. For every L_ZXVY I plot a Gauss bell. I would like to plot these sames Gauss bells but with a offset that I can change with an Inputbox (and without running the script again...).

Do you have any idea??

Thank you for your time and effort!

Eduardo

Not applicable
Author

Finally I put the offset in the dimension and it worked as I wanted!

Eduardo