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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

replacing if statement with set analyisis

hi all,

Can anyone help me out to replace these following 'if' statements with set analysis method please.

if([Fee type] = 'Contract Price', sum({<[Base Index]={'FIXED CASH'}, [Fixed/Index Price]={'FIXED','INDEX'}>}[Nominal Quantity])*-1,[Nominal Quantity]*-1)

if([Buy/Sell]='BUY',(( sum({<[Buy/Sell]={'BUY'}, [Base Index]={'FIXED CASH'}, [Fixed/Index Price]={'FIXED','INDEX'}, Location -= {'MET COAL','API5'}>}[Nominal Quantity])/1000)*-1)+

( sum({<[Buy/Sell]={'BUY'}, [Base Index]={'FIXED CASH'}, [Fixed/Index Price]={'FIXED','INDEX'}, Location = {'MET COAL','API5'}>}[Nominal Quantity])/500)*-1)

3 Replies
Not applicable
Author

can someone please help me out with this??

Not applicable
Author

Hi Sahana,

Can u attach sample file so it would be simple for community to make changes and post back

Thanks,

Prakash

Not applicable
Author

Hi Prakash,

I have attached a test application with the same 2 exp A and B.Can you help me out now buy replacing this expression in set analysis to obtain the same result.