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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Creating an expression line in script using another

Hi

I have created a line of script in Qlikview as follows:

if([Status] = '3. Project Submitted',1,if([Status] = '4C. Bid Under Negotiation/Awaiting Award

',1,0)) as [Pending Count],

This produces a 1 if the line has the status 3 or 4c.

What I want to do now is to create a column that multiplies [Pending Count] by a field [Application Value]

However every time I do it says 'no such field as [Pending Count].

I am sure I am just having a newbie moment, but can anyone help?

Rob

Labels (1)
6 Replies
sreenivas
Creator III
Creator III

PFA it may help you.

Not applicable
Author

sadly its confidential information.

I will see if I can generate some data to show the problem.

Not applicable
Author

Hi Rob,

are you doing something like this :

LOAD

....

if([Status] = '3. Project Submitted',1,if([Status] = '4C. Bid Under Negotiation/Awaiting Award

',1,0)) as [Pending Count],

[Application Value] * [Pending Count],

....

FROM .....

In this case you can't do it.

What you can do is:

TAB_A:

LOAD

....

if([Status] = '3. Project Submitted',1,if([Status] = '4C. Bid Under Negotiation/Awaiting Award

',1,0)) as [Pending Count],

....

FROM .....;

INNER JOIN LOAD "KeyField", [Application Value] * [Pending Count] as Field2

RESIDENT TAB_A;

Hope it helps

Regards

Giampiero

Anonymous
Not applicable
Author

Rob, I think you misunderstood Sreenivas. He wasn't asking for you to provide an example but was attaching a potential solution.

Jonathan

Not applicable
Author

Jonathan, thank you but the original reply said can you attach a qvw file, it has been editted or deleted it seems.

Not applicable
Author

Thank you all, in the end I did this another way with this expression in the table, rather than the script

sum({$<[Pending Count]= {1}>} aggr([Application Value], [Project Code]))