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

Announcements
Save $650 on Qlik Connect, Dec 1 - 7, our lowest price of the year. Register with code CYBERWEEK: Register
cancel
Showing results for 
Search instead for 
Did you mean: 
karensmith
Contributor II
Contributor II

MAX() Function

I am trying to use the max() to load the max ratio, which is decimal number. I am having problems with max() when querying AS400 file. Here is my code to pull data from AS400. I also tried to load data and then try to pull max value from a resident table, but that will not work either. Can someone please advise how to use Max() function for number values.

Y40_ALL:

LOAD CUSTDO AS SALES_CUST, YCPLDO, MAX(MAARDO) AS RATIO ;

SQL SELECT CUSTDO, MAARDO, YCPLDO FROM S10A5929.USSOMEA.SMDOP00

GROUP BY CUSTDO,YCPLDO, MAARDO;

1 Solution

Accepted Solutions
Not applicable

Hi Karen,

Try this:

Y40_ALL:

LOAD CUSTDO AS SALES_CUST, YCPLDO, MAX(MAARDO) AS RATIO

GROUP BY CUSTDO,YCPLDO ;

SQL SELECT CUSTDO, MAARDO, YCPLDO FROM S10A5929.USSOMEA.SMDOP00 ;

/Johan

View solution in original post

2 Replies
Not applicable

Hi Karen,

Try this:

Y40_ALL:

LOAD CUSTDO AS SALES_CUST, YCPLDO, MAX(MAARDO) AS RATIO

GROUP BY CUSTDO,YCPLDO ;

SQL SELECT CUSTDO, MAARDO, YCPLDO FROM S10A5929.USSOMEA.SMDOP00 ;

/Johan

karensmith
Contributor II
Contributor II
Author

Johan,

Thank you for the quick response. I tried your sugguest and that resolved my issue. Thank you so much!!!