Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
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
alexandros17
Partner - Champion III
Partner - Champion III

try this and let me know

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

View solution in original post

8 Replies
ali_hijazi
Partner - Master II
Partner - Master II

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

I can walk on water when it freezes
alexandros17
Partner - Champion III
Partner - Champion III

try this and let me know

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

Not applicable
Author

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.


alexandros17
Partner - Champion III
Partner - Champion III

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

ashfaq_haseeb
Champion III
Champion III

Hi,

Can you post sample data to look over?

Regards

ASHFAQ

marcus_malinow
Partner - Specialist III
Partner - 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

Not applicable
Author

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.

ashfaq_haseeb
Champion III
Champion III

Hi,

I cannot download document its corrupted.

Can you attach it again.

Regards

ASHFAQ