# New to Qlik Sense

If you’re new to Qlik Sense, start with this Discussion Board and get up-to-speed quickly.

Announcements
QlikWorld 2023, a live, in-person thrill ride. April 17 - 20, 2023, in Las Vegas! REGISTER TODAY
cancel
Showing results for
Did you mean:
Contributor II

## 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:

[Suma de Vta Tot Cre],

[Suma de Txs Tot Cre]

Resident [Ventas];

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

[Tablas]:

[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
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,

Contributor II

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:

[Cat Tar Cred],

Good luck!

Contributor II
Author

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

Specialist

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

In your syntax there are some small issues:

-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]

Kind regards,

Contributor II
Author

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

I attached the model,  thanks

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:

x, y

1, one

2, two

3, three ] ;

TableFinal:

f1,

f2,

f3,

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

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

Hope this helps.

Contributor II
Author

sorry, was a qlik sense app

now I attached the app in qlik view

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,

Contributor II
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

Tags
Community Browser