- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
PFA it may help you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
sadly its confidential information.
I will see if I can generate some data to show the problem.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Rob, I think you misunderstood Sreenivas. He wasn't asking for you to provide an example but was attaching a potential solution.
Jonathan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Jonathan, thank you but the original reply said can you attach a qvw file, it has been editted or deleted it seems.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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]))