Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
nevilledhamsiri
Specialist
Specialist

Set Expression for capturing some data

Hi,

I have a table like below

Code     values

77480     500

77170     1000

45150     450

78110    

77450

75150

Please write a set expression to get the list of codes which carries no values.

Thanks

Neville

1 Solution

Accepted Solutions
sunny_talwar

If you field called CODE or Code? Use it consistently in your expression

Sum({<Code = {"=Sum(values) = 0"}>}CODE)

View solution in original post

11 Replies
sunny_talwar

You need this in which object? List Box? Chart?

nevilledhamsiri
Specialist
Specialist
Author

please do it for both list box & chart

sunny_talwar

May be this for list box object

Aggr(Only({<Code = {"=Sum(values) = 0"}>} Code), Code)

For chart

Dimension

Code

Expression

Sum({<Code = {"=Sum(values) = 0"}>} Measure)

nevilledhamsiri
Specialist
Specialist
Author

what is meant by measure ?

sunny_talwar

It is just a placeholder... I don't know what you are trying to do in a chart (at least you have not mentioned what you are looking to do in a chart)

surendraj
Specialist
Specialist

May be this!!

In List box-->Properties-->General-->Field-->Expression-->

if(Len(trim(values)=0,Code))

nevilledhamsiri
Specialist
Specialist
Author

I made the expression as below which gives me even the codes with balances.I need following codes out of total list to be shown. Sorry for the trouble, please see what error I have made

78110   

77450

75150

Sum({<Code = {"=Sum(values) = 0"}>}CODE)

sunny_talwar

If you field called CODE or Code? Use it consistently in your expression

Sum({<Code = {"=Sum(values) = 0"}>}CODE)

nevilledhamsiri
Specialist
Specialist
Author

Dear Sunny,

Please see the attachment. CODE (Dimension) seems to be taken as it is at every point but could not get the results

Please see the error done