Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

agrimroquette
Contributor II

Correct formula

can anyone please correct this formula?

=IF(sum({$<[Type of Assignment]={'Allocated'}>}Value7) >[REF BUILD]  , 'OverAllocated',

IF(sum({$<[Type of Assignment]={'Allocated'}>}Value7) = [REF BUILD]  ,  'CompleteAllocated',

if(sum({$<[Type of Assignment]={'Allocated'}>}Value7) < [REF BUILD] ,'UnderAllocated' )))

1 Solution

Accepted Solutions
agrimroquette
Contributor II

Re: Correct formula

i got correct formula, Thanks All

=AGGR(

IF(sum (Value7) >SUM([REF BUILD])  , 'OverAllocated',

IF(sum (Value7) = SUM([REF BUILD])  ,  'CompleteAllocated',

if(sum (Value7) < SUM([REF BUILD]) ,'UnderAllocated' )))

, EmpRoleTeamMonthID)

5 Replies
Not applicable

Re: Correct formula

what is there in REF Build field  ? is it a static value?

agrimroquette
Contributor II

Re: Correct formula

Hi Khushboo,

its a numeric value that is already calculated

Thanks

micheledenardi
Valued Contributor

Re: Correct formula

What is the error ?

What is the result and what do you except ?

To have the best effort from the community please upload some screenshot/example image.

kamal_sanguri
Valued Contributor

Re: Correct formula

There is absolute no problem with the formula or syntax. Now question is where are you using this function(in which object), thats matters.

I have created few rows of sample data and tried that function, it gives output without any problem. See the attached Qlikview document.

I have used this function in Chart but it will not work in Text object. As it will give multiple result and text box shows only one value. Please share some more details about it.

agrimroquette
Contributor II

Re: Correct formula

i got correct formula, Thanks All

=AGGR(

IF(sum (Value7) >SUM([REF BUILD])  , 'OverAllocated',

IF(sum (Value7) = SUM([REF BUILD])  ,  'CompleteAllocated',

if(sum (Value7) < SUM([REF BUILD]) ,'UnderAllocated' )))

, EmpRoleTeamMonthID)