Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Set Analysis with Variable

Hi

I have a variable vSales.  I want to use it in a graph that shows the sales per week for the whole year.  Therefore I want to ignore any time related selections.

I have used the expression:

sum({<Week=,Month=>} $(vSales))

But this doesn't work.  What am I doing wrong?

Thanks

5 Replies
maxgro
MVP
MVP

how did you define  vSales?

martynlloyd
Partner - Creator III
Partner - Creator III

Hi

What does vSales contain? - the value of it will directly affect the expression.

Also, don't you want to use {$<.... to base it on the current selection?

Not applicable
Author

Hola si tu variable es vSales y esta representa un calculo con un resultado numerico debe estar en $(vSales), si vSales es un Texto que puede representar una dimension deberias ponerlo en '$(vSales)'.

Luego de que sepas que tipo de dato arroja tu vSales, podras definir el script.

Segun tu script :

suma ({} $ <Week=,Month=> (vSales))

Puede ser interpretado de la siguiente manera:


Sum({$<Week=,Month=>} $(vSales))

Sum({$<Week=,Month=>} '$(vSales)')


Not applicable
Author

What is the definition of the vSales variable ???

is a Expression, Field, Field Condition??

DD.

Not applicable
Author

Hi,

First, you check $(vSales) value with textbox or other tools.

When you add variable in other variable or variable in Set Analysis, you have to be sure that the variable has a correct value. I think the error is in variable's value.