Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
narender123
Specialist
Specialist

Condition

Hi All,

I have two column

1)Status

2) Paid_Status

i want

If(Status=1,'Approved',

if(Status=2,'Pending',

if(Status=3,'Completed',

if(Status=4,'Paid',

if(Status=1 and Paid_Status=6,'OutStanding'))))) as newstatus,

Result in filter is showing like

Approved

Pending

Completed

Paid

but not shows Outstanding

Why??

I have shown the table box with Status and Paid_Status dimention  in attachment.

Thanks

1 Solution

Accepted Solutions
jonathandienst
Partner - Champion III
Partner - Champion III

Hi

You just have to evaluate the more specific condition first:

if(Status=1 and Paid_Status=6,'OutStanding',

if(Status=1,'Approved',

if(Status=2,'Pending',

if(Status=3,'Completed',

if(Status=4,'Paid',

))))) as newstatus,

Regards

Jonathan

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein

View solution in original post

11 Replies
narender123
Specialist
Specialist
Author

Hi Vishwaranjan.

thanks for reply.

But i want where

Status=1 and Paid_Status=6, then outstanding

CELAMBARASAN
Partner - Champion
Partner - Champion

Hi,

I think in your image it Paid_Status is paid_status. I pointing out because qlikview is case sensitive can you confirm that?. Other than that I hope expression is fine.

Regards,

Celambarasan

narender123
Specialist
Specialist
Author

Hi Mohit,

You mean to say at status 1 we have to require two paid status.

But as i shown in attachment there is 2 condition in table box

1)status 1 with paid status 6

2)status 1 with -

it means different condition already??

Thanks

narender123
Specialist
Specialist
Author

Thanks Celambarasan.

i know i have written it Paid_Status by mistake.

But the problem is not that.

narender123
Specialist
Specialist
Author

Hello Mohit,

As you have shown

status  paid status

1          6

1         45

It is not showing OutStanding.

Same case is here

What i have to do in such condition????

narender123
Specialist
Specialist
Author

Actually paid status'-' is showing in table box with status ,but in actual paid status didnt have '-'.

paid status have only 0,2,5,6

narender123
Specialist
Specialist
Author

Please see my attachment.

The condition is same as i said.

jonathandienst
Partner - Champion III
Partner - Champion III

Hi

You just have to evaluate the more specific condition first:

if(Status=1 and Paid_Status=6,'OutStanding',

if(Status=1,'Approved',

if(Status=2,'Pending',

if(Status=3,'Completed',

if(Status=4,'Paid',

))))) as newstatus,

Regards

Jonathan

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
er_mohit
Master II
Master II

i can't open your file

as im using personal edition i change my paid status to null

then see the code

A:

LOAD

If(Status=1 and Paid_status='','Approved',

if(Status=2,'Pending',

if(Status=3,'Completed',

if(Status=4,'Paid',if(Status=1 and Paid_status=6,'OutStanding'))))) as newstatus

, * Inline [

Paid_status,Status

6,1

12,2

3,3

4,4

,1

];