Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to exclude items out of listbox with value 0?

Hi all,

I'm fighting the following problem. I have about 3000 items in my listbox and many of those items give the value 0. What I want to do is to exclude the items which gives y=0. Does someone have an idea how to do this?

Thank you!

8 Replies
Peter_Cammaert
Partner - Champion III
Partner - Champion III

What is y? Is it another field in the same table as your items? Is it the result of an aggregation expression?

The more information you supply from the start, the quicker you'll have an answer without successive questions for additional information.

Peter

clondono
Creator III
Creator III

Hello Jerry,

Maybe you can set a condition on your load statement like:

if(Y=0, Null(), Y)


In a ListBox null values are suppressed automatically.


Thanks,

Carlos

Not applicable
Author

Ah yes, well the following:

Screenshot_3.png

As you can see I selected "LaadpaalID" 3454 and "Gebruiker" 13806. With that I get an Y value around 35 kWh. But for some "LaadpaalID" and/or "Gebruiker" the Y value is 0. I want to get those out of my listbox.

And for another example:

Screenshot_5.png

When I select "LaadpaalID" 3540 there is no data to display because nobody uses that one, so I don't need it in the list box and I want it gone.

shaktisinghchau
Contributor III
Contributor III

Hi Jerry,

I am assuming Y is another dimension of your table and your displaying X values into Listbox, to remove Y=0 values from list box you need to follow this steps.

List box properties - > Field - > Choose expression - > = If(Y > 0, X )

It will list down only greater than zero values in List box.

Hope this help.

Thanks,

idogridish2
Creator II
Creator II

Hi Jerry,

you can eather load your data without zero value in this field

e.g

Load

y

From YourTable

Where  y <> 0;

or you can use the expression clondono seggested if(Y=0, Null(), Y) inside of a listbox expression.


Regards.

Peter_Cammaert
Partner - Champion III
Partner - Champion III

You can try a listbox with an expression field instead of a regular field (select <Expression> at the bottom of the field selection list):

=Aggr(Only({<LaadpaalID={"=Sum(Verbruik)<>0"}>} LaadpaalID), LaadpaalID)

I used an imaginary field "Verbruik", because I think that "y" is not the real consumption field. Replace with whatever is applicable in your data model.

Best,

Peter

Anonymous
Not applicable
Author

I had a similar requirement and this worked for me .Thank you  @Peter Cammaer

dialika_bantog
Partner - Contributor II
Partner - Contributor II

What if I'm trying to choose between including 0s or nulls or excluding them?