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

Announcements
ALERT: QlikView server communication interruptions following Microsoft Windows Domain Controller security updates
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Chart taking very long to load

I have a straight table chart which is made up of the following:

Dimension:

Approval_Status: It has 2 values: Approved and Unapproved

Expressions:

No. of SKUs: COUNT(DISTINCT QUOTE_KEY & SKU_NUMBER )

% of No. of SKUs:

COUNT(DISTINCT QUOTE_KEY & SKU_NUMBER )  with 'Relative' checked.

In IE, When I clear all filters, this chart takes very long to refresh. Sometimes it just times out.

The chart works fine using the QlikView desktop client.

Any help is appreciated.

Labels (1)
2 Replies
preminqlik
Specialist II
Specialist II

why dont you create field in script level like below

Load *,

QUOTE_KEY&'-'&SKU_NUMBER                         as               QUOTE_SKU

from path ;

and now count expression

count(distinct QUOTE_SKU)

jaimeaguilar
Partner - Specialist II
Partner - Specialist II

Hi, I don't know your data model, however just by seeing the fields you're using to calculate that expression I can assume that they're a loooot of records. (Just imagine all the possible combinations of distinct quotes AND distinct SKU number). In order to avoid that the chart takes so long to calculate, you can set a calculation condition (in general tab > calculation condition). You can limit the records that are displayed at once, for example just displaying 1 year of data. In that case your calculation condition should be something like:

=count(distinct Year) = 1 or =getselectedcount(Year) = 1

This way, unless you select only one year, the table won't be calculated.

Also as a side note, it is recommended that you don't use key fields (fields that are links between tables) directly in an expression. In case that you need to use a key field in an expression, it is better to create a duplicate of that field in script,

regards