Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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!
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
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
Ah yes, well the following:
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:
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.
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,
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.
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
I had a similar requirement and this worked for me .Thank you @Peter Cammaer !
What if I'm trying to choose between including 0s or nulls or excluding them?