Discussion board where members can get started with QlikView.
I have a simple script that loads some data from a resident table
[ID] as [ID],
[Name] as [Name],
[Cost] * [Markup] * [VAT] as [Total Price]
Inside the script I want to interact with the [Total Price] field to determine some other calculations i.e.
If ([Total Price] > 5000, 'Large Order', 'Small Order') as [Order Size]
But since the [Total Price] field is being created in the script I can't access it, when I reference it as in the example above I get an error that [Total Price] can't be found
In this example I could do something like:
If ([Cost] * [Markup] * [VAT] > 5000, 'Large Order', 'Small Order') as [Order Size]
but that seems redundant and in the scenarios I have the situation is considerably more complex than the example above
Any help much appreciated.
Go to Solution.
I may understand this wrongly but do you mean you get the erro message when you are applying the next load statement???
Left Join (Instructions)
because this should work...
If you could podt your script so that we can see what you are trying to achieve that would be great ...
That works perfectly. I was trying to access the field in the original load statement rather than running a join like you suggested.
The filed [Total Price] which you created In the instructions Table is created once the table is loaded
before loading the table if you perform any opertion on [Total Price] that one will give error.
so you need to add another table.
load * inline
[ID] as [ID],