Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Group by clause in Load statement

Hi,

I am trying to use a group by clause in QLikview 10.  I have this so far, but keep getting a load script failure.

LOAD

     SubsectionID,

     Count(SubsectionAddressed)as Grouptest

     

FROM (XmlSimple, Table is )

WHERE SubsectionAddressed = ' '

GROUP BY SubsectionID

  Could this be occuring because of where i am loading this from? Sharepointpage?  When I show the field information for SubsectionAddressed it bring up blanks or YES which is why I am looking for blanks ' '.

Thank you in advance.

16 Replies
Gysbert_Wassenaar

What is the error message?

I see you are now using ows_SubsectionID instead of SubsectionID. Are you sure the ows_* fields exist in the xml table?

And make sure you end the statement with a semicolon ;


talk is cheap, supply exceeds demand
Not applicable
Author

Try like:

LOAD

SubsectionID,

sum(if(SubsectionAddressed='',1,0))as Grouptest

FROM http://sharepointreporting.com/sites/compliance/_vti_bin/owssvr.dll?Cmd=Display&XMLDATA=1&RowLimit=0... (XmlSimple, Table is Group by clause in Load statement)

WHERE SubsectionAddressed = ' '

GROUP BY SubsectionID

Not applicable
Author

I tried it with the ; and still recieved a load failure.  The original field name is SubsectionID but when i pull it into qlikview through a web file it adds the ows_ in front of all fields.

Not applicable
Author

I tried your suggestion as well.  Should I not be including (XmlSimple, Table is [xml/data/row])  a the end of the file location? I also recieved a load script failure error message.

Not applicable
Author

Does anyone have more insite on this?

I tried with this statement below but keep getting a loadle listed below in my qlikview to bring in other data. Does that matter? 

 

LOAD

ows_SubsectionID,
Count(ows_SubsectionAddressed)as Grouptest
RESIDENT [http://sharepointreporting.com/sites/_vti_bin/owssvr.dll?Cmd=Display&XMLDATA=1&RowLimit=0&List={xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}&View={xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}] (XmlSimple, Table is [xml/data/row])

WHERE ows_SubsectionAddressed = ''
GROUP BY ows_SubsectionID,
ows_SubsectionAddressed

Thank you

robert99
Specialist III
Specialist III

Have you done this (as noted above)

And make sure you end the statement with a semicolon ;

Not applicable
Author

I think I figured it out.  I switched to using a Resident and then added the ; as well.  I need to play with it a little more to get the answers i am looking for but it no longer brings a load script error.

 

Load

ows_SubsectionID,
sum(if(ows_SubsectionAddressed='',1,0)) as Grouptest
RESIDENT SubsectionWorkstream
//Count(ows_SubsectionAddressed)
//sum(if(ows_SubsectionAddressed='Yes',1,0)) as Grouptest
WHERE ows_SubsectionAddressed = ''
GROUP BY ows_SubsectionID;

Thank you.