Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
dseelam
Creator II
Creator II

List Box Expression

How to write below if condition  as an expression in the list box ? which is working fine in straight table.

if(Item.STATUS='P',Item.STATUS,

IF(sum(DMND)>0,if(sum(ONHAND-DMND)<0,'A','S'),'P'))

Need some thing like this

cappp.PNG

1 Solution

Accepted Solutions
vishsaggi
Champion III
Champion III

What are the dimensions you used in your straight table? Just use those dimensions and add in your aggr() field in your list box expression and see? If not, share some sample data to look into.

View solution in original post

5 Replies
vishsaggi
Champion III
Champion III

Try:

= Aggr(if(Item.STATUS='P',Item.STATUS,

            IF(sum(DMND)>0,

                     if(sum(ONHAND-DMND)<0,'A','S'),'P')), Item.STATUS)

dseelam
Creator II
Creator II
Author

Vishwa,

It created a list box but it's giving wrong results when I filter according to logic it should select only A

Capture.PNG

vishsaggi
Champion III
Champion III

Can you share this sample to look into? can you also give a reason why only A should be coming?

dseelam
Creator II
Creator II
Author

created this field in straight table depending on active, slow and purge items as status using  expression

if(Item.STATUS='P',Item.STATUS,

IF(sum(DMND)>0,if(sum(ONHAND-DMND)<0,'A','S'),'P'))

which is working accurate according to numbers tested trying to get same status column as list box so that can use it as a filter

vishsaggi
Champion III
Champion III

What are the dimensions you used in your straight table? Just use those dimensions and add in your aggr() field in your list box expression and see? If not, share some sample data to look into.