Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Friends,
i am unable to pass the current selections to variable.
i have a country column and i want to pass the values based on current selection to variable.
like if i select any country in the country list box it should pass the country variable
I have tried below variable it is not working
vCountry = GetFieldSelections(Country)
and the above variable i need to use below set expression like below mentioned.
sum({<type={'customer'},country={$(vCountry)}>})sales
Any can help me
Thanks,
Venkat
Hi,
Try this way.
Let vCountry = GetFieldSelections(Country,'","')
sum({<type={'customer'},country={"$(vCountry)"}>})sales
Regards,
Kaushik Solanki
Hi,
Try this way.
Let vCountry = GetFieldSelections(Country,'","')
sum({<type={'customer'},country={"$(vCountry)"}>})sales
Regards,
Kaushik Solanki
Use as below
Variable
vCountry =IF(GetSelectedCount(Country),CHR(39)&Concat(DISTINCT Country,CHR(39) & ',' & CHR(39))&CHR(39),'')
Expression
=Sum({<type = {'customer'},Country={$(vCountry)}>}Sales)
But why do you even need it? QlikView by default will show you the data for the selected Country if you use this
Sum({<type={'customer'}>}) sales)
Correct Sunny, But my requirement is different,
I need to create one more variable using below set expression. like
vCountryCalc =Sum({<type = {'customer'},Country={$(vCountry)}>}Sales)
and this variable i need to use in my chart expression.
Thanks Manish,
it is working perfectly like what i am expecting.
Thanks Kaushik, for you quick response.
But once again, why won't this work?
vCountryCalc =Sum({<type = {'customer'}}>}Sales)
Hi sunny, I need a static values for the selected country, that's why i have to create a variable like below
vCountryCalc =Sum({<type = {'customer'},Country={$(vCountry)}>}Sales)
I guess I am still not sure what you are trying to do... but if it meets your requirement, who am I to complain
Best,
Sunny