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

need to calculate a new column with existing ones.need help please???

Hi all,

Please can anyone help me out with the below issue????

Please refer to the file attached as its little difficult to explain/understand without looking at the table inside..

In  the sheet you can see a table with few fields position_id,market_value_1,xoptiontype_and value.

1)here every position_id has a range in the market_value_1 from 79.1 to 90.hence all the position_id's lie in this range.

2)xoptiontype_ column has 2 values call/put.

Now I want to create a new table with market_value_1 and new_column where my new column should be :

the sum(value)for xoptiontype='call' and for that particular position_is.


Here I can do the green part but the red one is challenging.

each position_id has value for each market_value_1.

eg :in the chart if u click on 71.9,u can see all the various position_id's for 71.9 and the corresponding values in the value column.I want to sum up these values and put it into 1 row as a single value across 71.9 in a new table.same thing for 80,80.1,80.2..... 90  for xoptiontype='call'

I wish the explanation is clear.Please help me out to resolve this...

1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

Hi Sahana,

Pls check this and let me know

Regards

Jeba

View solution in original post

7 Replies
Not applicable
Author

Can anyone please help me out with the above issue????????????????????????please?????????

Anonymous
Not applicable
Author

If you are able to complete the Green part,then design the table after removing the dimention position.

It should work.

Not applicable
Author

Hi ,

I tried it out but somehow its not working.I have attached the file with the new column.

I want only one sum(value) for each distinct market_value_1,but I am getting multiple values.like here 79.1 should have only one value .which would be sum(value) for xoptiontype='CALL'

Have I made any mistake??? please can you check and help me out????

Anonymous
Not applicable
Author

Hi Sahana,

Pls check this and let me know

Regards

Jeba

Gysbert_Wassenaar

See attached qvw. Is that what you need?


talk is cheap, supply exceeds demand
Peter_Cammaert
Partner - Champion III
Partner - Champion III

Although your explanation is a bit confusing (and your data model has many fields with almost the same name, should clean that up first), I understand that you want your new column inside the old table. Replace your expression with:

=SUM({<xoptiontype={'CALL'}>} total <market_value_1> value)

and you're set.

Peterr

Not applicable
Author

Hi all,

Thanks for helping me solving this issue I had never thought that this could be done just by moving the dimentions.Good learning for me....

thanks a lot!!!!