Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I want to create a table with a variable with parameter. For example, i have the dimension year, and a variable that calculate the sales
of each year vSalesperYear($(variable1)), the thing is that the value of variable1 depends on de dimension year.
Imagine this is a qlikview table with dimension year and expresion $(variable1)
year variable1
2014 1
2015 2
I want to create a table with dimension year and expression vSalesPerYear($(variable1)).
Can anyone help me??
Thanks,
What are you trying to accomplish with these variables? You might be able to accomplish your goal without using variables. Can you explain what your end goal is?
i use variables only to use the expression i many graphs.
without using variables would be like this
sum({<idDate={"expresion that calculate the id"}>}sales)
but the expression that calculate the id depends on the dimension year, and the table i want to create have year
as a dimension, so i want that the expression that calculate the id, changes with the diferrentes values of year in my table
Is there any chance you could share your qvw? It would help in giving you a specific answer.
sry, i cant. Confidential information of my company.
What is the "expression that calculates the id"?
is any expresion for example min(iddate), the important things is that the expression changes with the diferrent values of the dimension
like this
year min(iddate) sum({<idDate={"min(iddate"}>}sales)
2010 1 sum({<idDate={"1"}>}sales) i want the result of this exprresion
2011 3 sum({<idDate={"3"}>}sales)
Are you saying you want to dynamically change which expression will calculate the value of a particular variable?
So you want this:
sum({<idDate = {min(iddate from a certain year)>}Sales)
?
correct, but i seems that Set Analysis will only get evaluated once for your objects, it does not get evaluated for every single row.