Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello everyone,
I would like to create new value of some field which is equal quotient of other two value of that field.
What I really want?
I want to make value 'PBT MARGIN' (row 53) which is quotient of value 'PBT' (row 52) and 'REVENUE' (row 11). Hope I managed to explain and hope you will help me.
Create these calculated accounts in the script and concaenate to the original table. Like:
Load
field1,
field2,
Accounts,
Amount
From <>;
load
field1,
field2,
'PBT Margin' as Accounts,
Sum(If(Accounts='PBT' , Amount)) /Sum(If(Accounts='REVENUE', Amount)) as Amount
From <> Where Match(Accounts, 'PBT', 'REVENUE') Group By field1, field2 ;
Create these calculated accounts in the script and concaenate to the original table. Like:
Load
field1,
field2,
Accounts,
Amount
From <>;
load
field1,
field2,
'PBT Margin' as Accounts,
Sum(If(Accounts='PBT' , Amount)) /Sum(If(Accounts='REVENUE', Amount)) as Amount
From <> Where Match(Accounts, 'PBT', 'REVENUE') Group By field1, field2 ;
Tnx bro, you really help me.
I set first if condition and then sum of field, and QV show me error that expression is not correct and I didn't now where i make mistake.
Is where condition necessary?
Not necessary. But that would help you improve reload time.
Hi Tres
I have issue on 2nd step on how to get the 2 field . see my enclosed QV doc.
Hope you can advise me .
Paul