Skip to main content
Announcements
Accelerate Your Success: Fuel your data and AI journey with the right services, delivered by our experts. Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
badicsis
Contributor
Contributor

If statement in load editor

Hi Guys, I want to include an if statement to manipulate some of the VAT codes in my data and this is what i want to achieve:

If the DrugID start with 'PRIV' and the EnterDateTime < '01/01/2020' then it should return 0, if the InventoryTaxID is '21' and the EnterDateTime < '01/09/2020' it should return '23' (instead of '21'), else (in every other case) return the InventoryTaxID.

This is my if statement:

if(DrugID like 'PRIV*',if(EnterDateTime < '01/01/2020','0',if(InventoryTax='21',if(EnterDateTime < '01/09/2020','23',InventoryTax)))) as VAT2

The problem is that the Drugs with date < 01/09/2020 are not receiving the value 23 but show up blank as per below. How should i re-write the above please? Thanks!

AccountNumberEnterDateTimeDrugIDInventoryTaxVat2
102/01/2019 11:02CARB921-
202/01/2019 11:02LENO21-
302/01/2019 11:02VORI421-
Labels (1)
0 Replies