Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
QlikView forum consolidation is complete. Labels are now required. LEARN ABOUT LABELS
cancel
Showing results for 
Search instead for 
Did you mean: 
samuel_brierley
Creator
Creator

Can someone pls check my formula?

= if(IF(ArbitrationInput.Group.rOOk=1581,1,IF(ArbitrationInput.Group.rOOk=550,3,IF(ArbitrationInput.Group.rOOk>550 and ArbitrationInput.Group.rOOk<1581,2,IF(ArbitrationInput.Group.rOOk='',' ',' ')))=2
and BELOW(IF(ArbitrationInput.Group.rOOk=1581,1,IF(ArbitrationInput.Group.rOOk=550,3,IF(ArbitrationInput.Group.rOOk>550 AND ArbitrationInput.Group.rOOk<1581,2,IF(ArbitrationInput.Group.rOOk='',' ',' ')))),1,1)=3
and ABOVE(IF(ArbitrationInput.Group.rOOk=1581,1,IF(ArbitrationInput.Group.rOOk=550,3,IF(ArbitrationInput.Group.rOOk>550 AND ArbitrationInput.Group.rOOk<1581,2,IF(ArbitrationInput.Group.rOOk='',' ',' ')))),1,1)<>3
and ABOVE(IF(ArbitrationInput.Group.rOOk=1581,1,IF(ArbitrationInput.Group.rOOk=550,3,IF(ArbitrationInput.Group.rOOk>550 AND ArbitrationInput.Group.rOOk<1581,2,IF(ArbitrationInput.Group.rOOk='',' ',' ')))),1,1)=1


and( or (BELOW(IF(ArbitrationInput.Group.rOOk=1581,1,IF(ArbitrationInput.Group.rOOk=550,3,IF(ArbitrationInput.Group.rOOk>550 AND ArbitrationInput.Group.rOOk<1581,2,IF(ArbitrationInput.Group.rOOk='',' ',' ')))),2,1)=3
or BELOW(IF(ArbitrationInput.Group.rOOk=1581,1,IF(ArbitrationInput.Group.rOOk=550,3,IF(ArbitrationInput.Group.rOOk>550 AND ArbitrationInput.Group.rOOk<1581,2,IF(ArbitrationInput.Group.rOOk='',' ',' ')))),3,1)=3
or BELOW(IF(ArbitrationInput.Group.rOOk=1581,1,IF(ArbitrationInput.Group.rOOk=550,3,IF(ArbitrationInput.Group.rOOk>550 AND ArbitrationInput.Group.rOOk<1581,2,IF(ArbitrationInput.Group.rOOk='',' ',' ')))),4,1)=3
or BELOW(IF(ArbitrationInput.Group.rOOk=1581,1,IF(ArbitrationInput.Group.rOOk=550,3,IF(ArbitrationInput.Group.rOOk>550 AND ArbitrationInput.Group.rOOk<1581,2,IF(ArbitrationInput.Group.rOOk='',' ',' ')))),5,1)=3),1,'X')

I realise its lengthy but if you look at its most of the formulas is just moving up and down a column.

it should read something like if logic 1 = 2 AND logic 2 <> 3 AND logic 3 = 1 AND ( any of logic 4,5,6 = 3) then put a 1 if not put an X.

it doesnt seem to like the bracket i have inbetween the and/or.

thanks for any help

1 Solution

Accepted Solutions
sushil353
Master II
Master II

Hi,

It seems you have issue in your below statement..

For the last record it will return undefined value, so it may cause an issue in your condition..

Try to enclose your below statement inside ALT.. like

Alt(Below(.......),0)

HTH

Sushil

View solution in original post

12 Replies
balkumarchandel
Specialist II
Specialist II

Hi,

Can you post sample qvw.

samuel_brierley
Creator
Creator

Ye no prblem.

thanks for your help on this.

FYI im only have the desktop license.

PrashantSangle

Hi,

Its really difficult to identify error without sample QVW.

But looking at your posted script you are missing ')'.

You are 1st bracket was highlighting and does not highlighting closing bracket.

Regards,

Great dreamer's dreams never fulfilled, they are always transcended.
samuel_brierley
Creator
Creator

apologies the file I just sent had an incorrect formula in it, this occurred while chopping down to a sample.

the formula I am struggling with is smoothing 2.

amit_saini
Master III
Master III

Hi,

Looks like problem with single ')' bracket , see below:

You need to close this red bracket in script , better please share qvw else its difficult to check.

Thanks,
AS

sushil353
Master II
Master II

Hi,

Are you getting any error ?

~Sushil

alkesh_sharma
Creator III
Creator III

Hyi, The very first if condition bracket open is in red. this bracket needs to be closed.

samuel_brierley
Creator
Creator

yes im getting an error however not with the red bracket, that is purely an error with what i copied across as im playing with it to get it to work properly.

I suppose what im asking is how to use and(or(logic 1 or logic 2....) and

that is where im getting an error.

the below is the most upto date formula

if(IF(ArbitrationInput.Group.rOOk=1581,1,IF(ArbitrationInput.Group.rOOk=550,3,IF(ArbitrationInput.Group.rOOk>550 and ArbitrationInput.Group.rOOk<1581,2,IF(ArbitrationInput.Group.rOOk='',' ',' '))))=2
and BELOW(IF(ArbitrationInput.Group.rOOk=1581,1,IF(ArbitrationInput.Group.rOOk=550,3,IF(ArbitrationInput.Group.rOOk>550 AND ArbitrationInput.Group.rOOk<1581,2,IF(ArbitrationInput.Group.rOOk='',' ',' ')))),1,1)=3
and( or BELOW(IF(ArbitrationInput.Group.rOOk=1581,1,IF(ArbitrationInput.Group.rOOk=550,3,IF(ArbitrationInput.Group.rOOk>550 AND ArbitrationInput.Group.rOOk<1581,2,IF(ArbitrationInput.Group.rOOk='',' ',' ')))),2,1)=3
or BELOW(IF(ArbitrationInput.Group.rOOk=1581,1,IF(ArbitrationInput.Group.rOOk=550,3,IF(ArbitrationInput.Group.rOOk>550 AND ArbitrationInput.Group.rOOk<1581,2,IF(ArbitrationInput.Group.rOOk='',' ',' ')))),3,1)=3
or BELOW(IF(ArbitrationInput.Group.rOOk=1581,1,IF(ArbitrationInput.Group.rOOk=550,3,IF(ArbitrationInput.Group.rOOk>550 AND ArbitrationInput.Group.rOOk<1581,2,IF(ArbitrationInput.Group.rOOk='',' ',' ')))),4,1)=3
or BELOW(IF(ArbitrationInput.Group.rOOk=1581,1,IF(ArbitrationInput.Group.rOOk=550,3,IF(ArbitrationInput.Group.rOOk>550 AND ArbitrationInput.Group.rOOk<1581,2,IF(ArbitrationInput.Group.rOOk='',' ',' ')))),5,1)=3) <- CLOSING BRACKET FOR THE AND OR STATEMENT    
and ABOVE(IF(ArbitrationInput.Group.rOOk=1581,1,IF(ArbitrationInput.Group.rOOk=550,3,IF(ArbitrationInput.Group.rOOk>550 AND ArbitrationInput.Group.rOOk<1581,2,IF(ArbitrationInput.Group.rOOk='',' ',' ')))),1,1)<>3
and ABOVE(IF(ArbitrationInput.Group.rOOk=1581,1,IF(ArbitrationInput.Group.rOOk=550,3,IF(ArbitrationInput.Group.rOOk>550 AND ArbitrationInput.Group.rOOk<1581,2,IF(ArbitrationInput.Group.rOOk='',' ',' ')))),1,1)=1,1, 'x')

sushil353
Master II
Master II

Hi,

It seems you have issue in your below statement..

For the last record it will return undefined value, so it may cause an issue in your condition..

Try to enclose your below statement inside ALT.. like

Alt(Below(.......),0)

HTH

Sushil

View solution in original post