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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

simple maths - subtracting

Hi,

I thought this should be simple but why can't it work:

Lookup('%A_MthAmt', '%A_MthKey', %A_MthID , 'tblCALC') - %ForecastAmt AS %Variance

Note: both the %ForecastAmt and the Lookup have values.  This is what I get in the table view:

LookupValue    %ForecastAmt     Variance

2000                 150                    -

The variance should be 2000-150 so Variance should show 1850.

Any ideas?

Thanks.

1 Solution

Accepted Solutions
alexandros17
Partner - Champion III
Partner - Champion III

a question:

does it work without the - %ForecastAmt part ???

View solution in original post

3 Replies
alexandros17
Partner - Champion III
Partner - Champion III

a question:

does it work without the - %ForecastAmt part ???

sujeetsingh
Master III
Master III

try loading in the script and then use in next resident load

Not applicable
Author

Thanks a million, Alessandro,

You're right!!  I got the lookup parameter %A_MthKey wrong.  The table view showed the "2000" value from the join and I wrongly assumed QlikView would tell me it can't find that field.