Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

[resolved] How to select only maximum value from tMap?

Hi All,
I would like to select only the maximum value of num.
num column is located in table2.

Here is an sql example:
select max(num)
from table1 left join table2
on (condition1>condition2)

I have tried performing the above sql using tMap.
table1 --> tMap --> table3
table2(lookup)

I have no problem trying to do a left join of table1 and table2 and I manage to include the condition at the filter in tMap. However, I do not know how to get the max(num).
Table3 have an empty num column where I can input the max(num) into.
Please help.
Labels (2)
13 Replies
Anonymous
Not applicable
Author

@TRF, It's working! Thanks a lot for your explanation once again! (:
TRF
Champion II
Champion II

Tell what is your database (oracle? mySQL ? postgreSQL ? other ?)
One way should be to convert from date to string, or better to integer, when selecting from table.
You tSetGlobalVar to initialize a global variable.
Anonymous
Not applicable
Author

@TRF, I manage to get it work with your working.
Just that I used context.date instead of globalMap. I made some mistake in the code for context.date and that is why there is error message. But it's working now! Thanks!
TRF
Champion II
Champion II

You're welcome