Discussion board where members can get started with Qlik Sense.
I want to create new field in the data
- Want to name the field as (profit) where I calculate total - cost only if another field which is (Date of delivery is not NULL)
total, cost, date of delivery
Field I want to create: Profit of deliveries
Basis formula in mind: total - cost IF date_of_delivery not NULL.
Any help with this as I am not a programmer.
Go to Solution.
Try below in Load Script,
Total - if(not isnull([Date of delivery]) or len([Date of delivery])>1 , Cost) as Profit
May be like below:
if(not isnull([Date of delivery]) or len([Date of delivery])>1 , Total - Cost) as Profit
You could use:
if(date_of_delivery, total - cost, 0) as [Profit of deliveries]
I ended up using if(isNull(dateOfDelivery,'Not Delivered','Delivered')
Thanks a lot