Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have a column that stated Indonesia Region with another column to all countries including indonesia.
Indonesia - Brunei
Indonesia - Malaysia
Indonesia - China
Indonesia - Indonesia
Indonesia - Singapore
Indonesia - America
Qn is I need two set of formula to derive the data in a column value
One formula for Indonesia - to countries excluding Indonesia
Another formula for Indonesia to Indonesia
Is there any way i can do it?
whats is TMP? and what is 1, 2
Hi ,
As you mentioned you needed to define 2 formulas under one Expression.
Just wanted to check what is the Condition under which you wanted to fit these 2 formulas?.
Means is there is any dimension w.r.t that you want to use this expression.
Regards
Yusuf
Tmp is your field name and subfield is used to get the specific string
ex in your case
Indonesia - Indonesia
Indonesia - Malaysia
Indonesia - China
Indonesia - Indonesia
Indonesia - Singapore
each string has '-' as common subfield(fieldname,'-') will seperate each sun string like Indonesia,Singapore etc
1 represents string before your delimiter '-' and vice versa
As attached. This table ID -> TSHIP refers to From ID(Indonesia) to _______
As you can see 10 PH means from ID to PH, ID to TH etc etc
However when it comes to ID to ID, i need a different sum expression
These are my formulas to derive
From ID to others
=Sum({<
Status = {'TSHIP'}
,Unlocode_Place_Of_Loading = {'ID*'}
>} Sales)
From ID to ID
=Sum({<
Status = {'TSHIP'}
,Unlocode_Place_Of_Loading = {'ID*'}
,Unlocode_Place_Of_Discharge = {'ID*}
>} Sales)
If(Country='Indonesis - Indonesia','A','B') as CountryFlag
nw u gt 2 combinations in the countryflag column, one is Ind - Ind and Ind-OtherCountry
use it for ur calculations...
=if
(
Country_Code = 'ID',
Sum(Derived_Status = 'TSHIP' and Container_Class_Name = 'Laden' and Unlocode_Port_Of_Loading = 'ID*' and Unlocode_Port_Of_Discharge = 'ID*')
,Sum(Derived_Status = 'TSHIP' and Container_Class_Name = 'Laden' and Unlocode_Port_Of_Loading = 'ID*')
)
does this works? what i get is OUt of object memory
Hi,
please try to use set analysis in the expression mentioned by you.
=if
(
Country_Code = 'ID',
Sum({< Derived_Status = 'TSHIP' and Container_Class_Name = 'Laden' and Unlocode_Port_Of_Loading = 'ID*' and Unlocode_Port_Of_Discharge = 'ID*' >}Sales )
,Sum({<Derived_Status = 'TSHIP' and Container_Class_Name = 'Laden' and Unlocode_Port_Of_Loading = 'ID*')
>}Sales)
//Yusuf
Hi i tried your code but there is an error in set modifier expression,
>}TEU
} is the error
Try this
=if
(
Country_Code = 'ID',
Sum({< Derived_Status = {'TSHIP'}* Container_Class_Name = {'Laden'} * Unlocode_Port_Of_Loading ={ 'ID*'} * Unlocode_Port_Of_Discharge = {'ID*' }>}Sales ),
Sum({<Derived_Status = {'TSHIP'} *Container_Class_Name = {'Laden'} * Unlocode_Port_Of_Loading = {'ID*'}
>}Sales)
hope it helps
tried your code but there is an error in set modifier expression,
>}TEU
} is the error