Qlik Community

QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

Announcements
Modernize Your QlikView Deployment webinar, Nov. 3rd. REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Not applicable

if or if statement in qlikview


Hello everybody,

i have a (for me) difficult issue.

I have two dimension fields (postrulecode and assetstatus) with infos and want to create a third dimension (constructionstatus) which is dependent on the both before.

 

=IF(postrulecode='0450','under Construction',

OR
IF(assetstatus='INTRAY','under Construction',

//[ELSE]

'ASSET'))

What is wrong in this formular?

Very much thanks in advance

1 Solution

Accepted Solutions
Highlighted

try this and let me know

=IF(postrulecode='0450' OR  assetstatus='INTRAY','under Construction','ASSET')

View solution in original post

8 Replies
Highlighted
Partner
Partner

if( postrulecode='0450' or Assetstatus = 'intray','under Construction','ASSET')

I can walk on water when it freezes
Highlighted

try this and let me know

=IF(postrulecode='0450' OR  assetstatus='INTRAY','under Construction','ASSET')

View solution in original post

Highlighted
Not applicable

Wow that answer was quick. Thanks.

I think it is not completely correct, because for the line with postrulecode = 0450, I get 'ASSET' as result.

So it seems that qlikview ignores the first condition.


Highlighted

Check your data, the condition must work ... let me know

Highlighted

Hi,

Can you post sample data to look over?

Regards

ASHFAQ

Highlighted
Specialist III
Specialist III

If this is the case then it may be that you have spaces in your data.

Try using trim(postrulecode) in your expression

Highlighted
Not applicable

Hi please find attached an example.

hc_001.jpg

The last two lines are Assets under construction. If you open right sight you will see as postrulecode '0450' in the last line.

Hope you'll find the mistake.

Highlighted

Hi,

I cannot download document its corrupted.

Can you attach it again.

Regards

ASHFAQ