Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
hkg_qlik
Creator III
Creator III

Restrict Data during loading process

Hi,

I have a Revenue Fact table I am loading from a Data Warehouse. But I want to restrict the data from loading like we do where clause in SQL.

Example: Table NAme: REVENUE_FACT

Field name/Column Name : 1.Revenue, 2.COGS, ORDER_TYPE etc

Now while loading the script I want to restrict the ORDER_TYPE not equal to Transfer Order.

How can I do that?

Thanks,

H

9 Replies
rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

The best way to do this is to continue to do the filtering in the SQL statement.

SQL SELECT * FROM REVENUE_FACT
WHERE ORDER_TYPE <> 'Transfer Order';

-Rob

hkg_qlik
Creator III
Creator III
Author

Thanks Rob.

Also is there a way we can restrict it at a Report level?

Thanks,

H

rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

By Report level, I'm assuming you mean the document level ('Report" is an object type in a QV document).

You can exclude data from a document by making selections. If you want to make the selections "hard", you can lock the selections and also use bookmarks to make the selections easy to apply. If you want to remove the data entirely for certain users (User Joe does not see any rows where OrderType="Transfer") then look at Section Access security in the reference guide.

-Rob

rotero
Creator
Creator

is there a way to restrict inclusion of records from excel file data loading?

ex.

LOAD Cycle,

     Team,

     TerrCode as Terr,

     Rep_Name,

     MD_Name,

     Specialty,

     Location,

     Class,

     Target,

     Actual

FROM

(biff, embedded labels, table is [Cycle 9 Call Report$]) 

this is the sample load statement but i need to restrict Terr<>'specific value'

Miguel_Angel_Baeyens

Hi,

WHERE clause will work with excel files as well

Table:

LOAD Cycle,

     Team,

     TerrCode as Terr,

     Rep_Name,

     MD_Name,

     Specialty,

     Location,

     Class,

     Target,

     Actual

FROM

(biff, embedded labels, table is [Cycle 9 Call Report$])

WHERE Terr <> 'Something';

Hope that helps.

Miguel

rotero
Creator
Creator

my first attempt is i use alias Terr rather TerrCode and it fail

then i tried the orig fieldname and its works..

BIG THANKS!!

jagan
Partner - Champion III
Partner - Champion III

Hi,

Use the Limited Option in

Edit Script -> Debug -> Limit Load -> Select and give number of rows to be loaded.

Loads the given number of rows in all tables.

Regards,

jagan.

Miguel_Angel_Baeyens

Hi Jagan,

Just to avoid any further confussion, that will limit the load regardless the value in a field, loading only the first n lines from the source, and that is not the case. If you only want to load records where Company = 'A', in either an excel file, a qvd file or any other data source, you need to do that using the WHERE clause, either in the source query (SQL for example) or in the LOAD part.

Regards.

Miguel

jagan
Partner - Champion III
Partner - Champion III

Hi,

You are correct Miguel.

Regards,

Jagan.