Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I am trying to divide the column data into filter value can I use + with if example: can I use the following script??
if ([Brand]='so', 'sony', if([Brand]='lg', 'lg',if([Brand]='ss'+'sp'+'sm','samsung', 'Other'))) as "Brand name"
there is small issue which I forgot , there is a another column where they made in ‘made in’ for LG
I want only ‘made in’ ‘UK’ or ‘EU’ for brands remaining it’s fine. For now this is my script
if ([Brand]='so', 'sony', if([Brand]='lg', 'lg',if([Brand]='ss' Or [Brand]='sp' Or[Brand]='sm','samsung', 'Other'))) as "Brand name"
I want to use ‘match’ ’made in’ UK or EU if([brand]=’lg’ ,’lg’.
Hi
You can add this new condition to the line, comparing the "country" column. For example
if(Brand = 'sm' and Country='UK', 'samsung', 'Other') as "Brand name"
Hi Madhu,
try
Pick(1+Match(Brand,'lg'),'UK','EU')
EDIT: Misread your message and got things backward
Pick(1+Match(Brand,'lg'),'EU','UK')
Hi,
is' made in' column name is not required in script?
Hi,
If you have a chart with dimension Brand then
Pick(1+Match(Brand,'lg'),'EU','UK')
will work as an expression.
Putting it in the script instead does makes sense. Then you'll have [Made In] as a dimension in your data model.
cheers
Andrew
Hi Andrew,
I am writing this in script level.
If I understand you correctly that would be
if ([Brand]='so', 'sony', if([Brand]='lg' and ([made in]='UK' or [made in]='EU'), 'lg',if([Brand]='ss' Or [Brand]='sp' Or[Brand]='sm','samsung', 'Other'))) as "Brand name"
Hi,
Is match is not required???
That depends on the contents of the [made in] field, I don't know your data and/or data model. The = operator will only be true for exact matches, if [made in] is for example a concatenated string of countries you could use
WildMatch([made in],'*EU*','*UK*')>0