Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Friends,
can anyone please let me know how to do this simple if in Qlik sense
If Product is 'Food' then the tax rate is 7.5%, if the Product is Drink then the tax rate is 9.5%.
Thanks,
Kumar
Hello Kumar,
as far as I understand your case, this should work (in the load script as well as in sheet expressions) by nesting a second if in the "else" part of your if-condition, just like below:
if(Product='Food', 0.075, if(Product='Drink', 0.095, defaultValue))
Replace the default value with whatever Tax Rate you want to apply if the Product is neither "Food" nor "Drink". If you only have food or drinks, then you could just write one single if condition:
if(Product='Food', 0.075, 0.095)
Hope this helps.
Alex
Hi @pjpkumar26 ,
=pick(match(product,'Food','Drink'),'7.5%','9.5%')