Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
ananyaghosh
Creator III
Creator III

Resident load problem

Hi,

I am going to use the following query with resident load, but it gives me syntax error for the following load statement;

[207 Mutual Funds Retail]:

Load "Sales Key",

Sum("SalesUSD") as "Mutual Funds"

Resident [Temp Table 5]

Where  "Trans Trade Class" ='S' and ("Product Type" !='DE' or "Product Type"!='PA');


in Sql I have a query like this:


Select sum(Sales) from table 1 where

("Product Type"<>'DE' or "Product Type"<>'PA' or "Product Type"<>'RE' or "Product Type"<>'SA' or "Product Type"<>'CE'

or "Product Type"<>'AA' or "Product Type"<>'VA' or "Product Type"<>'5M' or "Product Type"<>'FA') ;

Thanks,

Sandip

1 Solution

Accepted Solutions
rahulpawarb
Specialist III
Specialist III

Hello Sandip,

You can make use of below given sample script:

[207 Mutual Funds Retail]:

Load [Sales Key],

Sum(SalesUSD) as [Mutual Funds]

Resident [Temp Table 5]

Where  [Trans Trade Class] ='S' and Not Match([Product Type], 'DE', 'PA')

GROUP BY [Sales Key];

Hope this will be helpful.


Regards!

Rahul

View solution in original post

5 Replies
stabben23
Partner - Master
Partner - Master

Hi,

You have forgot to use Group by, this is needed when you use aggregation in script.

Load "Sales Key",

Sum("SalesUSD") as "Mutual Funds"

Resident [Temp Table 5]

Where  "Trans Trade Class" ='S' and ("Product Type" !='DE' or "Product Type"!='PA')

Group by "Sales Key";

beck_bakytbek
Master
Master

Hi Sandip


try this:


[207 Mutual Funds Retail]:

Load "Sales Key",

Sum("SalesUSD") as "Mutual Funds"

Resident [Temp Table 5]

Where  "Trans Trade Class" ='S' and ("Product Type" !='DE' or "Product Type"!='PA')

Group by "Sales Key";

MK_QSL
MVP
MVP

What error are you getting?

try below

("Product Type" <>'DE' or "Product Type"<> 'PA')

Group by "Sales Key";

stabben23
Partner - Master
Partner - Master

You should also change Your Not valid to !=, use <> instead

rahulpawarb
Specialist III
Specialist III

Hello Sandip,

You can make use of below given sample script:

[207 Mutual Funds Retail]:

Load [Sales Key],

Sum(SalesUSD) as [Mutual Funds]

Resident [Temp Table 5]

Where  [Trans Trade Class] ='S' and Not Match([Product Type], 'DE', 'PA')

GROUP BY [Sales Key];

Hope this will be helpful.


Regards!

Rahul