Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Add formulas to existing fields in script

Hi

I have a field called Accounts with a number of account descriptions like Gross Profit and Invoicing.  I have another field called Amount which is the amount for each account.  I would like to create a couple of ratio formulas one of which is Gross Profit / Invoicing and I thought this would be best to do in the script.

Ultimately I would like for these formulas to be in the same field as Accounts so that they all get displayed as a dimension.  I think that this will probably involve an inline load but I am having trouble with the expressions.

Could someone please explain the best way to go about this.

Thanks very much

10 Replies
Not applicable
Author

This would be the equivalent qv syntax:

=If(Type = "Actual" and Account = "GP%", sum(AmountGP)/sum(AmountInv),if(Type = "Actual and Account <> "GP%", sum(Amount)))

Kiran.