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

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Error in Expression: if takes 2-3 parameters

Hi,

I have a straight table with a number of dimensions, one is calculated dimension to only include items that start with F.

I have added an expression to calculate the quantity this is a simple addition of 2 fields. When I refresh the presentation I don't have a problem.

However, I need to create another expression work out the invoice amount which is [Inv Qty]*[Sales Unit Price]. The expression editor says that there is an error in the expression and when the reports runs I get the error" Error in Expression: if takes 2-3 parameters. Even though it is not an if statement.

Any help would be appreciated as this is driving me made

20 Replies
Not applicable
Author

INV QTY is  [Inventory Free Quantity]+[Inventory Reserved Quantity]

Capture1.PNG

awhitfield
Partner - Champion
Partner - Champion

So what the syntax being used in this bit: one is calculated dimension to only include items that start with F.

Andy

vishsaggi
Champion III
Champion III

Are those the fields from the table or some other expression labels. May be try like:

= RangeSum(Sum([Inventory Free Quantity]), Sum([Inventory Reserved Quantity]))

Label this as [INV QTY]

= [INV QTY] * Sum([Sales Price Unit])

Something like this?

Not applicable
Author

=if([Item Code] like('f*'),[Item Code]

Not applicable
Author

 

[Inventory Free Quantity], [Inventory Reserved Quantity] and [Sales Unit Price] are all from tables

 

vishsaggi
Champion III
Champion III

You still getting the same error?

zebhashmi
Specialist
Specialist

Try this

=([Inventory Free Quantity]+[Inventory Reserved Quantity])*[Sales Unit Price]


Not applicable
Author

This doesn't bring an error back in the expression but get the same Error in Expression: if takes 2-3 parameters

vishsaggi
Champion III
Champion III

There is an if statement somewhere it is picking up. do you have any other statements other than this expression in that? can you check scrolling down or up? I mean maximize your edit script expression and see if there are any other expressions hidden? Else can you send us the snapshots of those two expressions.

Not applicable
Author

still doesn't like the expression Inv Qty