asked on # I need a value in a field regardless of the true false statement.

I need a value in a field regardless of the true false statement.

This is telling me i have the field "Expected_Value" listed to many times..

so even if the First CASE is false i still need the ELSE part to populate with '$50,000'

etc...with the others

Thanks

fordraiders

This is telling me i have the field "Expected_Value" listed to many times..

```
CASE WHEN( MCD.Freight_GIS = 'Prepaid on A.com Orders (PPG)' AND mcd.contract_number LIKE '%NCP%' AND (Sum_Of_Sales_Current < 50000 OR Sum_Of_Sales_Current IS NULL ) )THEN '$50,000' ELSE '$50,000' END AS Expected_Volume,
CASE WHEN( MCD.Freight_GIS = 'Prepaid (PPD)' AND mcd.contract_number like'%NCP%' AND (Sum_Of_Sales_Current < 250000 OR Sum_Of_Sales_Current IS NULL ) )THEN '$250,000' ELSE '$50,000' END AS Expected_Volume,
CASE WHEN( MCD.Freight_GIS = 'Prepaid Parcel (PPP)' AND mcd.contract_number LIKE '%NCP%' AND (Sum_Of_Sales_Current < 50000 OR Sum_Of_Sales_Current IS NULL ) )THEN '$50,000' ELSE '$50,000' END AS Expected_Volume,
CASE WHEN( MCD.Freight_GIS = 'Prepaid Parcel on G.com Orders (PPPG)' AND mcd.contract_number LIKE '%NCP%' AND (Sum_Of_Sales_Current < 100000 OR Sum_Of_Sales_Current IS NULL ) )THEN '$100,000' ELSE '$50,000' END AS Expected_Volume,
CASE WHEN( MCD.Freight_GIS = 'Standard (PPA)' AND mcd.contract_number LIKE '%NCP%' AND (Sum_Of_Sales_Current < 50000 OR Sum_Of_Sales_Current IS NULL ) )THEN '$50,000' ELSE '$50,000' END AS Expected_Volume
```

so even if the First CASE is false i still need the ELSE part to populate with '$50,000'

etc...with the others

Thanks

fordraiders

Microsoft SQL ServerSQL

Your CASE statement should be:

```
CASE WHEN( MCD.Freight_GIS = 'Prepaid on A.com Orders (PPG)' AND mcd.contract_number LIKE '%NCP%' AND (Sum_Of_Sales_Current < 50000 OR Sum_Of_Sales_Current IS NULL ) ) THEN '$50,000'
WHEN( MCD.Freight_GIS = 'Prepaid (PPD)' AND mcd.contract_number like'%NCP%' AND (Sum_Of_Sales_Current < 250000 OR Sum_Of_Sales_Current IS NULL ) ) THEN '$250,000'
WHEN( MCD.Freight_GIS = 'Prepaid Parcel (PPP)' AND mcd.contract_number LIKE '%NCP%' AND (Sum_Of_Sales_Current < 50000 OR Sum_Of_Sales_Current IS NULL ) ) THEN '$50,000'
WHEN( MCD.Freight_GIS = 'Prepaid Parcel on G.com Orders (PPPG)' AND mcd.contract_number LIKE '%NCP%' AND (Sum_Of_Sales_Current < 100000 OR Sum_Of_Sales_Current IS NULL ) ) THEN '$100,000'
WHEN( MCD.Freight_GIS = 'Standard (PPA)' AND mcd.contract_number LIKE '%NCP%' AND (Sum_Of_Sales_Current < 50000 OR Sum_Of_Sales_Current IS NULL ) ) THEN '$50,000'
ELSE '$50,000' END AS Expected_Volume
```

View this solution by signing up for a free trial.

Members can start a 7-Day free trial and enjoy unlimited access to the platform.

THANKS

CASE WHEN( MCD.Freight_GIS = 'Prepaid on A.com Orders (PPG)' AND mcd.contract_number LIKE '%NCP%' AND (Sum_Of_Sales_Current < 50000 OR Sum_Of_Sales_Current IS NULL ) )THEN '$50,000' ELSE '$50,000' END AS Expected_Volume

_PPG,CASE WHEN( MCD.Freight_GIS = 'Prepaid (PPD)' AND mcd.contract_number like'%NCP%' AND (Sum_Of_Sales_Current < 250000 OR Sum_Of_Sales_Current IS NULL ) )THEN '$250,000' ELSE '$50,000' END AS Expected_Volume

_PPD,CASE WHEN( MCD.Freight_GIS = 'Prepaid Parcel (PPP)' AND mcd.contract_number LIKE '%NCP%' AND (Sum_Of_Sales_Current < 50000 OR Sum_Of_Sales_Current IS NULL ) )THEN '$50,000' ELSE '$50,000' END AS Expected_Volume

_PPP,CASE WHEN( MCD.Freight_GIS = 'Prepaid Parcel on G.com Orders (PPPG)' AND mcd.contract_number LIKE '%NCP%' AND (Sum_Of_Sales_Current < 100000 OR Sum_Of_Sales_Current IS NULL ) )THEN '$100,000' ELSE '$50,000' END AS Expected_Volume

_PPPG,CASE WHEN( MCD.Freight_GIS = 'Standard (PPA)' AND mcd.contract_number LIKE '%NCP%' AND (Sum_Of_Sales_Current < 50000 OR Sum_Of_Sales_Current IS NULL ) )THEN '$50,000' ELSE '$50,000' END AS Expected_Volume

_PPA