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: 
MalcolmCICWF
Creator III
Creator III

Expression Data Exclude

I currently am summing and creating some numbers from an amount field. I noticed my sums were coming out too high and I finally realized I was including some amounts I should not be. Below is the current Expression I have created to get what I need.

(row_fields = 'Gross IRR' or row_fields = 'Net IRR', num(sum(BL_Value)/sum(investment), '#,###.##%'),num(sum(amount),'#,##0'))

I have added the below underlined to try an exclude data matching these field requirements, I thought I placed it correctly within the function, the editor says "Expression OK", but it is not removing what I had expected. I would like to know if I am placing this correctly or is there another way I can write this? Is this the best way to exclude this data specific to this chart? I need the data brought in for another chart.

(row_fields = 'Gross IRR' or row_fields = 'Net IRR', num(sum(BL_Value)/sum(investment), '#,###.##%'),
if(portfpool <> 'ONETIME' or portfpool <> 'MICROLN' or portfpool <> 'CONSOLID' or portfpool <> 'CIRCAP',  num(sum(amount),'#,##0')))

1 Solution

Accepted Solutions
Anonymous
Not applicable

Hello, Jeremy.

Try this way:

if(row_fields = 'Gross IRR' or row_fields = 'Net IRR', num(sum(BL_Value)/sum(investment), '#,###.##%'),
num(sum({$<portfpool -= {'ONETIME', 'MICROLN', 'CONSOLID', 'CIRCAP'}>} amount),'#,##0')))

The syntax check you say it's wrong an -=, but it should work anyway.

Cheers.

View solution in original post

5 Replies
Not applicable

Jeremy,

it may be difficult to check expression without example with data model and some data....

regards

D

MalcolmCICWF
Creator III
Creator III
Author

Well I wrote that in hopes someone could let me know if it looked correct, but I will include a data model...

Anonymous
Not applicable

Hello, Jeremy.

Try this way:

if(row_fields = 'Gross IRR' or row_fields = 'Net IRR', num(sum(BL_Value)/sum(investment), '#,###.##%'),
num(sum({$<portfpool -= {'ONETIME', 'MICROLN', 'CONSOLID', 'CIRCAP'}>} amount),'#,##0')))

The syntax check you say it's wrong an -=, but it should work anyway.

Cheers.

MalcolmCICWF
Creator III
Creator III
Author

This actually worked very well, thanks Bruno!

Anonymous
Not applicable

You're welcome, Jeremy. Glad I could help.