Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

can we use a variable in set analysis??? need help pleaseee????

Hi all,

can someone help me out with below issue please???????

sum({<xoptiontype_={'CALL'}>}(Nominal_Quantity*voption))  where voption is a variable???

because voption is a formula which is very complex consisting of many other variables in it so I stored it as a variable.

19 Replies
Not applicable
Author

Hi ,

I tried the same s you said,I am still not getting the values . in the file attached my last column is the one that is getting calculated. please help.

Not applicable
Author

Hi

I think that the right syntax is:

sum({<xoptiontype_={'CALL'}>}(Nominal_Quantity*$(=voption)))

Not applicable
Author

Hi Augustin,

I tried the same

it still doesn't work

Not applicable
Author

Hi,

There is a difference, how you store an expression in a variable with or without an equal sign...

Look at this:  http://qlikshare.com/scope-variables-qlik/

You said that variable voption is one complex expression composed of more variables and calculations...
Try to start from bottom up; from this variable, and slowly expanding your expression.

I think that for giving you the right answer, we should also understand your data model and want do you want to do...
Paste your data model.
And tell us if you get any result (calculation) or you don't get calculation at all. 

On your place would i start with examining variable voption and it's expression and then build up...

brijesh1991
Partner - Specialist
Partner - Specialist

Can you tell what you are storing in variable? let's go from scrach

Take variable into input box and make some selection from other related listbox. Check whether variable value in input box changing accordingly.

sarvjeet
Contributor III
Contributor III


use Expression  in table as :

 

sum

({<xoptiontype_={'CALL'}>}(Nominal_Quantity))*

$(voption)

and use dimentions : Strike_Price1, buy_sell, strike_price

updated qvw attached

Not applicable
Author

Hi Sarvjeet,

I did get the result by this method but I also require a line chart with strike_price1 as the dimention and the

net call ie:

({<xoptiontype_={'CALL'}>}(Nominal_Quantity))*$(voption)  as the expression.

I need to get  a single line graph but that doesnt happen 

Not applicable
Author

hi all.

Please can someone help me out with this issue,I am stuck up and not able to proceed.with your help I am able to get the net values but the graph is not successfull as required.

If you look at my file attached :

Sheet 1-net values come ,but when I try to plot the line graph it doensn't happen.I want it to come as shown in the sheet 2 where when I plot my strike_price1 against my net expression I need to get a single line grapg.

Please help me someone................

sarvjeet
Contributor III
Contributor III

use this expression :

 

Sum(AGGR(sum({<xoptiontype_={'CALL'}>}(Nominal_Quantity))* $(voption), [Strike Price],strike_price1, buy_sell))

it will work 🙂

-Sarvjeet

Not applicable
Author

See the attached file:

I changed strike_price1 to strike_price