Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have a table containing rows of different brands eg:-
Brand1
Brand2
Brand3
When doing a list box for brands I see all brands, but I would like to group Brand1 and Brand2 as 'Education' and Brand3 as 'Games'.
can anyone help. Apologies if I haven't given all the information.
regards
M
Use Below Expression to create list box
IF(Brand = 'Brand1' or Brand = 'Brand2', 'Education', If(Brand = 'Brand3', 'Games'))
Use this.
LOAD *, If(match(Brand,'Brand3'), 'Games', 'Education') as Category Inline [
Brand
Brand1
Brand2
Brand3
];
You can do this best in load script e.g. using a mapping load, something like
MyMap:
Mapping load [From, To
Brand1, Education
Brand2, Education
Brand3, Games
];
Load
....
Brand
Applymap('MyMap',Brand) as MyGroup
....
From Source
use expression in list box
=if(brand='Brand1' or brand='Brand2', 'Education', 'Games')
would this be slower?
If I add it into the script it will be quicker? the added complication Ihave is that I'm using and ApplyMap to get the initial brand name too.
I try to avoid these nested ifs, the impact varies with the amount of data and two of those nested if's won't have that much effect, but I'm guessing there are more then those three?
Next to performance, there is also maintainbility. You could have the mapping load in an easy to maintain excel file
See also