13 Replies Latest reply: Aug 10, 2018 6:16 AM by Ruben Marin

# Expression eror in Pick match

Hi , I am new to Qlik Sense as i want to create a calculation for each field and i need to take it as a table when i am trying to do that with pick match i am getting an expression error

first i created a valuelist of 5801,5802,5803,58033

Now i am trying create a measure field to match that fields,Here i am facing a problem can u plzz help me to solve these

I have show my report as below

• ###### Re: Expression eror in Pick match

Hi Aryan,

I think the problem may be at the ValueList function, try define a column instead of.

pick(match([column], ... , .... , ...),if......

G.

• ###### Re: Expression eror in Pick match

I think there are multiple problems here... would you be able to share your expression as text?

• ###### Re: Expression eror in Pick match

Pick(Match(ValueList('5801','5802','5803','58033'),'5801','5802','5803','58033',

Count(distinct total [EMployeeID-MF]),

Sum(total [Hours-MF]),

Sum(total [Total-MF]),

Sum(total [Total-MF])))

• ###### Re: Expression eror in Pick match

I think you shouldn't use the PICK() function here, but just use a nested IF instead.

So IF(Valuelist(a,b,c,d) =a, <expression>,

IF(Valuelist(a,b,c,d) = b, <expression>, etc))

• ###### Re: Expression eror in Pick match

pick(match(valuelist(5801,5802,5803,58033),5801,5802,5803,58033)

,Sum({<[F/I] = {'F'}>}FieldName)

,Sum({<[F/I] = {'F'}>}FieldName)

,Sum({<[F/I] = {'F'}>}FieldName)+Sum({<[F/I] = {'F'}>}FieldName)+Sum({<[F/I] = {'F'}>}FieldName)

,Sum({<[F/I] = {'F'}>}FieldName)+Sum({<[F/I] = {'F'}>}FieldName)+Sum({<[F/I] = {'F'}>}FieldName)

)

• ###### Re: Expression eror in Pick match

When i add the Measure it is showing as Internal Engine error

• ###### Re: Expression eror in Pick match

When i am adding the measure in Pivot table i  am getting an internal engine error

• ###### Re: Expression eror in Pick match

Hi aryan, at first sight i see two 2 things:

- Match should be closed after 58033

- Sum inside of sum: use RangeSum(Sum(), Sum()...) instead, or remove the outer sum, in this case seems it's not needed

• ###### Re: Expression eror in Pick match

I changed the formula, i wrote new formula above

• ###### Re: Expression eror in Pick match

Still needs to close Match:

Pick(Match(ValueList('5801','5802','5803','58033'),'5801','5802','5803','58033'),

Count(distinct total [EMployeeID-MF]),

Sum(total [Hours-MF]),

Sum(total [Total-MF]),

Sum(total [Total-MF])

)

• ###### Re: Expression eror in Pick match

But when i am trying to take the measure it is showing as internal engine error

• ###### Re: Expression eror in Pick match

I will need to tale a look at a sample, I have used this approach in many situations and I haven't found that message.

• ###### Re: Expression eror in Pick match

Thank you Ruben problem solved