Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
h_demarco
New Contributor III

Different results using same formula (table x script variable)

Dear all,

I am having some difficult to understand why a formula assinged to variable in script is not returning the same result as formula wrote directly in a table.

So my table is:

QVTable.JPG

[Tempo Calendario] is =Sum(Duração_turno)

QVTempoCal1.JPG

[Tempo Calendario2] is tempo_calendario  (variable)

QVTempoCal2.JPG

in script I have

Set tempo_calendario= =Sum(Duração_turno);

QVScript.JPG

I'd like to get [Tempo Calendario] result, but with variable assign because the same formula is used many times. Variable will save my time upon any change.

Any idea on how to handle this?

Thanks in advance.

Henrique

Tags (2)
1 Solution

Accepted Solutions

Re: Different results using same formula (table x script variable)

Now use your variable with dollar sign expansion

=$(VariableName)

4 Replies

Re: Different results using same formula (table x script variable)

can you remove the = sign in front of your  set variable in script and then try?

h_demarco
New Contributor III

Re: Different results using same formula (table x script variable)

It showed up the text 'Sum(Duração_turno)' instead of number.

Re: Different results using same formula (table x script variable)

Now use your variable with dollar sign expansion

=$(VariableName)

h_demarco
New Contributor III

Re: Different results using same formula (table x script variable)

It worked!

It is not clear the function of dollar sign, but I will search and try to understand it.

Thank you.

Community Browser