Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
hello..
i'm kinda new in qlikview
so i have a table in qvd, just say its name is TRY
it have 3 columns :
1. date_col
2. value_col
3. code_col
so in 1 day we can have many value_col
but i need only to load max value of it into qvw
i've tried :
LOAD
date_col, max(value_col), code_col
FROM
but it's not working
so, how to do that?
can qlikview do that?
thx..
Hi
Aggregation functions like Max normally need to have some grouping applied if you have other non-aggregated fields in your load sattement.
So this
LOAD max(value_col)
FROM(qvd);
is a valid statement and would find the overall max of that field. In your case, you have two non-aggregated fields, so you may need something like:
LOAD date_col, max(value_col), code_col
FROM(qvd)
GROUP BY date_col, code_col;
Hope that helps
Jonathan
Hi
Aggregation functions like Max normally need to have some grouping applied if you have other non-aggregated fields in your load sattement.
So this
LOAD max(value_col)
FROM(qvd);
is a valid statement and would find the overall max of that field. In your case, you have two non-aggregated fields, so you may need something like:
LOAD date_col, max(value_col), code_col
FROM(qvd)
GROUP BY date_col, code_col;
Hope that helps
Jonathan
hello Jon..
i've tried ur solution
but the data keeps show detail data, not the maximum value data
RandyDeP
It will show the maximum value of value_col for each combination of date_col and code_col.
If there is only one value of value_col for each combination in your source data, then the max function has nothing to aggregate, so it will return every record.
Perhaps you could post a sample of your data for further investigation?
Jonathan