Qlik Community

Ask a Question

App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

Announcements
QlikWorld Online 2021, May 10-12: Our Free, Virtual, Global Event REGISTER TODAY
cancel
Showing results for 
Search instead for 
Did you mean: 
ingo_lsg
Contributor III
Contributor III

Group by clause only works when using all dimensions

The following load statement doesn't work, when not using all of the loaded dimensions. (here in this example I didn't use TYPE_OF_SVC.

 

Any idea?

 

Load
    KEY_Ausland,
    PERIODE_NR_ROW,
    CARRIER_ALN_CD_ROW,
   TYPE_OF_SVC,
    SUM(CAP_FST_AMT+ CAP_BSN_AMT+ CAP_PEC_AMT+CAP_ECO_AMT ) as SEATS_TTL_NR_ROW,
 sum(STARTS_TTL_NR_ROW) as STARTS_TTL_NR_ROW
Resident Nachfrage_Angebot_Temp
Group by KEY_Ausland,PERIODE_NR_ROW, CARRIER_ALN_CD_ROW;
//,TYPE_OF_SVC;
Drop Table Nachfrage_Angebot_Temp;

2 Replies
Gysbert_Wassenaar

If you use a GROUP BY then all the fields that are not used in aggregation functions (like sum) must be included in the GROUP BY clause. So a field is either in the GROUP BY or used in a sum/count/max/min (or any other aggregation) function.


talk is cheap, supply exceeds demand
ingo_lsg
Contributor III
Contributor III
Author

So, when I want to add additional fields I would have to do this in a second resident load?