Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Campo no encontrado al usar mapping/applymap

Hello, I have a table that is loaded using mapping, the problem is that by using the fields in another table tells me that [Sum of Txs Tot Cre] was not found, what am I doing wrong?

Ventas2:

mapping LOAD

[Suma de Vta Tot Cre],

  [Suma de Txs Tot Cre]

  Resident [Ventas];

//-----------------------------------------------------------------------------------------------

[Tablas]:

LOAD

[Cat Tar Cred],

  replace([Venta Min],'.',',') as [Venta Min],

  [Venta Max],

  replace([Vale Min],'.',',') as [Vale Min],

  replace([Vale Max],'.',',') as [Vale Max],

  replace([Tasa],'.',',') as [Tasa],

    ApplyMap('Ventas2',[Suma de Txs Tot Cre]),

    sum([Suma de Txs Tot Cre]) as SumTSX2,

    ApplyMap('Ventas2',[Suma de Vta Tot Cre]),

  [Suma de Vta Tot Cre]/[Suma de Txs Tot Cre] as VarVtaTxs,

if([Venta Min]<=SumTSX2, Tasa,'-') as Prueba00,

if([Venta Max]<=SumTSX2, Tasa,'-') as Prueba01,

if([Vale Min]<=VarVtaTxs, Tasa,'-') as Prueba10,

if([Vale Max]<=VarVtaTxs, Tasa,'-') as Prueba11

FROM [lib://Transbank/Sabana.xlsx]

(ooxml, embedded labels, table is Tablas);

group by [Cat Tar Cred],[Venta Min],[Venta Max],[Vale Min],[Vale Max],[Tasa],

[Suma de Txs Tot Cre], [Suma de Vta Tot Cre];

9 Replies
arulsettu
Master III
Master III

try giving some name

ApplyMap('Ventas2',[Suma de Txs Tot Cre]) as somename,

    sum([Suma de Txs Tot Cre]) as SumTSX2,

    ApplyMap('Ventas2',[Suma de Vta Tot Cre]) as as somename,

Anonymous
Not applicable
Author

Hi,

I had a similar issue some days ago, and the problem was that I was missing the line "Data: " before the LOAD instruction. Your code should look:

Data:

LOAD

[Cat Tar Cred],


Good luck!

Anonymous
Not applicable
Author

still doesn't work, will be because the table 'Ventas2' is not inline?

santiago_respane
Specialist
Specialist

Hi, can you share a sample app with dummy data?

In your syntax there are some small issues:

-in your from you have a ';' before your group by

-Also you mention that your error is [Sum of Txs Tot Cre] was not found and in your load statement you are using [Suma de Txs Tot Cre]

With a sample app it will be easier to help you.

Kind regards,

Anonymous
Not applicable
Author

Hi Santiago, [Sum de Txs Tot Cre] and [Suma de Txs Tot Cre] was a transalate mistake

I attached the model,  thanks

santiago_respane
Specialist
Specialist

Hi Joaquin,

it seems the file you posted is in a newer version of QV or i cannot open it, no prob.

As i can see you are creating a mapping that uses numbers as source and destination, you should verify that those numbers match and they have both same value and format.

You can try adding the third parameter to know when there's no match

ApplyMap('Ventas2',[Suma de Txs Tot Cre],'NO MATCH')


Also verify that the field you are using in the applymap must exists in your file [lib://Transbank/Sabana.xlsx]

Check the below example:

map1:

mapping load * inline [

x, y

1, one

2, two

3, three ] ;

TableFinal:

LOAD

     f1,

     f2,

     f3,

     ApplyMap('Map1',f4,'No Match') as f4Mapped

FROM [PathToMyFile] (ooxml, embedded labels, table is Tablas);

Hope this helps.

Anonymous
Not applicable
Author

sorry, was a qlik sense app

now I attached the app in qlik view

santiago_respane
Specialist
Specialist

Hi Joaquin,

please explain what do you want to achieve with your applymap, not by code but the result you want to obtain.

Kind regards,

Anonymous
Not applicable
Author

I need calculate this in the script

i dont know if is the best solution, I tried to resolve this whith

joins between the tables, but the results are wrong data

if([Venta Min]<=SumTSX2, Tasa,'-') as Prueba00,

if([Venta Max]<=SumTSX2, Tasa,'-') as Prueba01,

if([Vale Min]<=VarVtaTxs, Tasa,'-') as Prueba10,

if([Vale Max]<=VarVtaTxs, Tasa,'-') as Prueba11

sorry for my english