Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

QV_learner
New Contributor

expression in load * inline

Hello!

 

Can anyone please tell me if we can write expression in Load * Inline[];?

If yes, please give some example.

 

Thanks and Regards,

Vivek

7 Replies
MVP & Luminary
MVP & Luminary

Re: expression in load * inline

LOAD *, Ceil(123/45) as Number [
Field1
A
B
C
];

talk is cheap, supply exceeds demand
VishalWaghole
Valued Contributor II

Re: expression in load * inline

You have to write it like preceding load like below,

LOAD *, sum(Sales) as Sales [
Field1, Sales
A, 10
B, 23
C, 34
A, 12
C, 54
];

Regards,
Vishal
QV_learner
New Contributor

Re: expression in load * inline

Thanks;

But my problem is, I want to print each value by different expression.

Let's say,

Load * Inline

[

     Col, Col1, Col2

     A, Expression1, Expression2

     B, Expression1, Expression2

];

where A and B are any text.

 

MVP & Luminary
MVP & Luminary

Re: expression in load * inline

A concrete example of which data should be loaded and should return which results would be quite useful.

- Marcus

Highlighted
QV_learner
New Contributor

Re: expression in load * inline

Load * Inline
[

temp, high

temp1, count({$<HighAcceptPriority={1},HighRejectPriority={1}>}ProductID)

]

this is my expression. 

But in the table it's giving me output as

temphigh
1count({$<HighAcceptPriority={1},HighRejectPriority={1}>}ProductID)

 

where 1 is value of temp1 in temp column.

 

Please suggest some solution!

 

Thanks and Regards,

Vivek

MVP & Luminary
MVP & Luminary

Re: expression in load * inline

From a Qlik point of view it's just a string and won't be evaluated in any way. The only possibility to evaluate such string is the use from a $-sign expansion like: $(=YourExpressionField) but it creates an adhoc-variable what meant it will be evaluated only once before the calculations of the object are executed and applied there for each row.

In short: your approach won't work. Of course there are ways to bypass it but they are neither trivial nor have they much benefit in the most usecases. Therefore my suggestion: just keep it simple by writing all needed expression there where you need them and switching to the really advanced stuff only if there is really no easier way.

- Marcus

QV_learner
New Contributor

Re: expression in load * inline

Thanks Marcus!

Regards,

Vivek