Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

More one dimension

Hi everyone

If i need show for example

cuentas a

cuentas b

cuentas c

i make a single dimension for example if (left(cuenta,1)='a','cuentas a',if(left(cuenta,1)='b','cuentas b','cuentas c'))

but i need more than 20 dimensions and the data for table of sql is received without group by.

Is possible make more one dimension with a single if but the dimension shows one below other or the unique mode is nested ifs  because qlik show me

cuentas a  cuentas b depending of cuentas a and cuentas c depending of cuentas b.

Thank in advance.

1 Solution

Accepted Solutions
Jason_Michaelides
Luminary Alumni
Luminary Alumni

Hi,

I can't open your attachement (asking for a password I think) but never mind as I understand you now.  You need to use ApplyMap():

Map_Cuenta:

MAPPING LOAD * INLINE [

In,Out

1,activo

2,passivo

etc,etc

];

Data:

LOAD

     Field1

     ,Field2

     ,etc

     ,ApplyMap('Map_Cuenta',LEFT(cuenta,1))     AS     NewField

FROM....;

Hope this helps,

Jason

View solution in original post

3 Replies
Jason_Michaelides
Luminary Alumni
Luminary Alumni

Sorry but it's really difficult to understand you!  Can you give an example of the source data and a picture of how you want it to end up?

Jason

Not applicable
Author

In the file atached i have a unique dimension as is:

if(left(cuenta,1)='1','activo','pasivo')

but i need separate more filters,a lot of 20.

Mi question is if possible write

if(left(cuenta,1)='1','activo')

if(left(cuenta,2)='2','pasivo') and not

if(left(cuenta,1)='1',activo',if(left(cuenta,1='pasivo',if(left(cuenta,1)='3','..'   and more ifs.

etc. and obtain the same result because more clearely the code.

Jason_Michaelides
Luminary Alumni
Luminary Alumni

Hi,

I can't open your attachement (asking for a password I think) but never mind as I understand you now.  You need to use ApplyMap():

Map_Cuenta:

MAPPING LOAD * INLINE [

In,Out

1,activo

2,passivo

etc,etc

];

Data:

LOAD

     Field1

     ,Field2

     ,etc

     ,ApplyMap('Map_Cuenta',LEFT(cuenta,1))     AS     NewField

FROM....;

Hope this helps,

Jason