5 Replies Latest reply: Sep 15, 2014 6:36 AM by deepak tibhe

# Weight ranges

Hi,

I am trying to group some shipment data by weight range in a Straight table, however I can only get it to work partially.

At the moment I am using an IF function like this:

=If(SHP_WEIGHT <=0.50, '0.5KG',

If(SHP_WEIGHT >>0.50<=1.00, '1KG',

If(SHP_WEIGHT >>1.01<=2.00, '2KG',

If(SHP_WEIGHT >>2.01<=3.00, '3KG',

If(SHP_WEIGHT >>3.01<=4.00, '4KG',

'unknown')))))

This is not giving me the result I need.

The 2KG range now shows from 2.00 up to 6.00 and the 3KG range shows for 6.00 up to 16.00.

How can I fix this?

• ###### Re: Weight ranges

=If(SHP_WEIGHT <=0.50, '0.5KG',

If(SHP_WEIGHT >0.50<=1.00, '1KG',

If(SHP_WEIGHT >1.00<=2.00, '2KG',

If(SHP_WEIGHT >2.00<=3.00, '3KG',

If(SHP_WEIGHT >3.00<=4.00, '4KG',

'unknown')))))

• ###### Re: Weight ranges

Hi Manisch,

I'm afraid your suggeestion is not working for me, I am not allowed to use the single ">" option, does this mean there is something wrong with the data?

• ###### Re: Weight ranges

Definitely, we are missing Aggr here...

Something like

Aggr(

If(SHP_WEIGHT <=0.50, '0.5KG',

If(SHP_WEIGHT >0.50<=1.00, '1KG',

If(SHP_WEIGHT >1.00<=2.00, '2KG',

If(SHP_WEIGHT >2.00<=3.00, '3KG',

If(SHP_WEIGHT >3.00<=4.00, '4KG',

'unknown'))))),Shipment)

Expression

COUNT(Distinct Shipment)

• ###### Re: Weight ranges

Class() would be a better option.

• ###### Re: Weight ranges

use class function for this,but in this case u will get fixed range,

Thanks