Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have a listbox which displays count of products for each line. I want to suppress the line which contain 0.
I am using the following formula to generate the count:
count({$ <
[Financial Year] = {2014},
[Financial Period] = {1,2}
>}[Product num])
+
count({$ <
[Financial Year] = {2013},
[Financial Period] = {11,12}
>}[Product num])
It generates the list as expected but I just want to suppress the 0 values How do I suppress the 0 values in listbox?
Thank you in advance.
Hi Ranajit, maybe using a calculated expression, in the list box preoperties, instead of selecting the field, go to the bottom of that list and select <Expression>, you can use this expression:
Aggr(If(count({$ <[Financial Year] = {2014}, [Financial Period] = {1,2} >}[Product num]) +
count({$ <[Financial Year] = {2013},[Financial Period] = {11,12}>}[Product num])<>0, [Product num]), [Product num])
Not tested.
try with:
If(
count({$ <
[Financial Year] = {2014},
[Financial Period] = {1,2}
>}[Product num])
+
count({$ <
[Financial Year] = {2013},
[Financial Period] = {11,12}
>}[Product num])
=0, Null(),
count({$ <
[Financial Year] = {2014},
[Financial Period] = {1,2}
>}[Product num])
+
count({$ <
[Financial Year] = {2013},
[Financial Period] = {11,12}
>}[Product num])
)
let me know
Hi Ranajit, maybe using a calculated expression, in the list box preoperties, instead of selecting the field, go to the bottom of that list and select <Expression>, you can use this expression:
Aggr(If(count({$ <[Financial Year] = {2014}, [Financial Period] = {1,2} >}[Product num]) +
count({$ <[Financial Year] = {2013},[Financial Period] = {11,12}>}[Product num])<>0, [Product num]), [Product num])
Not tested.
No alternative but to calculate the amount twice:
If(Count({<[Financial Year] = {2014}, [Financial Period] = {1,2}>
+ <[Financial Year] = {2013}, [Financial Period] = {11,12}>} [Product num]) <> 0,
Count({<[Financial Year] = {2014}, [Financial Period] = {1,2}>
+ <[Financial Year] = {2013}, [Financial Period] = {11,12}>} [Product num]))
PS I refactored your two terms into a set expression union '+'
I tried this before. it does suppress the 0 values but I want it not to show the line represented by the 0 value.
I tried this before as well. It does supress the 0 but I do not want to show the entire line represented by the 0 value
I tried it but it did not work. Thanks for your help.
if you have multiple expressions you will need the if statement containing the calculation of the condition in each, else they will continue to force a blank cell.
please share your qvw
I can't share the QVW, its for work. I'll make a qvw and upload it.