Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

fmazzarelli
Contributor III

what's wrong

Hi Community,

could you help me?

error in expression


IF((Commessa = {'ASSTEL'}), 1,sum({<Commessa = {'ASSTEL'}>} [TotOreLavorate]))

I can not understand what's wrong

4 Replies
uday_pasupuleti
Contributor II

Re: what's wrong

Try this

If(Comessa = 'ASSTEL',1,Sum( {<Commessa = {'ASSTEL'}>}[TotOreLavorate]))

MVP
MVP

Re: what's wrong

May be this?

If(Commessa = 'ASSTEL', 1, Sum(TOTAL {<Commessa = {'ASSTEL'}>} [TotOreLavorate]))

Employee
Employee

Re: what's wrong

The small error is that you have a bracket too much (after 'ASSTEL') and the big problem is that Commessa is a naked field reference. See Use Aggregation Functions!

HIC

fmazzarelli
Contributor III

Re: what's wrong

Hi,

I may have misplaced the question.


Immagine.png


I'm not able to create a function


Column C

if (Commessa = 'ASSTEL' and (CTRAAN = 'C'), SUM(HOUR), 1)



Column N

if (Commessa = 'ASSTEL' and (CTRAAN = 'N'), SUM(HOUR), 1)