Discussion Board for collaboration on QlikView Scripting.
Hello dear community, i have a strange problem while using group by for the first time, maybe someone can pint me to the mistake i made.
The goal is, to aggregate all daily values which represent amounts that can be added (so, f.e. not temperatures)
So far, i found out, that aggregate does not work in the script.
Why would someone implement something, that only works in objects on the gui ??
So, the alternative would be load with the "group by" option, which loads the data that should be aggregated through a resident load.
Qlikview responds with an syntax error to the short load scrip below.
but if i remove
"sum(MV_Data) as MW_MonData" and correct the ",", i get the following:
"Aggregation expressions required by GROUP BY clause"
ID_VALUE, // water, heating, electricity etc.
UNIT, // m3, kwh, liter
DATE_month, // f.e. 201401
// MV_day, // former number of the day, not used in this table
MV_Data, // numerical content for ID_VALUE
sum(MV_Data) as MW_MonData // whats wrong whith this one ?
group by DATE_month, ID_SENS;
Any suggestions ? Thanks in advance.
You need to all fields to group by and remove MV_DATA field.
group by DATE_month, ID_SENS,ID_VALUE,UNIT,NR_Building;
Whenever we do aggregation using group by, we have to add all the columns, which are to be shown, in group by clause except the column on which aggregation is being done.