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: 
Not applicable

Create a straight table (chart) and store it in a file

Hi,

I'm having trouble with Storing fields in a file. I'm not sure how to explain this but here's an attempt;

mytable:

Load *,
Year(Date)&num(week(Date),00) as YearWeek,
count(Counter) as Numberof,
sum(Credits) as Credits,
(sum(Price)-sum(Credits)) as [Price - Credits]
;
LOAD
Price,
Counter,
Credits,
Date
FROM (qvd);



Store mytable into mytable.txt (txt);

Drop mytable;

I want to have YearMonth as a dimension and then the other fields as expressions. When I've tried to load this one QlikView freezes and then crashes.

How do I do this?

Thank you

/A.

2 Replies
syed_muzammil
Partner - Creator II
Partner - Creator II

Hi Anykay,

I am afraid that you cannot use aggregate functions in a Load statement without a group by clause.

I also don't think we can use aggregate functions in a Preceding load as you have used. Try to use those functions in a table expression.

syed_muzammil
Partner - Creator II
Partner - Creator II

Hi,

Or you can have a separate load statement for the functions above. If you are grouping the aggrgation based on the dates then :

mytable:

Load *,
Year(Date)&num(week(Date),00) as YearWeek
;
LOAD
Price,
Counter,
Credits,
Date
FROM (qvd);

mytable_temp:

Load Date,
count(Counter) as Numberof,
sum(Credits) as Credits,
(sum(Price)-sum(Credits)) as [Price - Credits]

Resident mytable group by Date;
;

Store mytable_temp into mytable.txt (txt);