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

Announcements
See why IDC MarketScape names Qlik a 2025 Leader! Read more
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Variables with parameters

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,

10 Replies
Not applicable
Author

you can try sum(if(idDate = min({<Year =>}idDate), Sales))

I'm not sure this is exactly right, but if you want to include a dimension in your calculation I believe you must use an if statement within your expression.

See this post for help as well: Evaluating "sets" in the context of a dimension