Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Announcements
Qlik® Product Spotlight: Discover what’s possible. Get more from our products.
See for yourself. Register today.
mahitham
Not applicable

Need help on IF Logic

Hi Experts,

Can any one please help me to replicate the below logic into qlik

=If(OR(ISBLANK(Startdate ), ISBLANK(Enddate)),"",

     IF(AND(Type="New",Status="Completed"),NETWRORKDAYS(Startdate,Enddate), "")

  )


Thanks in advance.


1 Solution

Accepted Solutions
agigliotti
Not applicable

Re: Need help on IF Logic

take a look at https://help.qlik.com/en-US/sense/April2018/Subsystems/Hub/Content/Scripting/DateAndTimeFunctions/ne...

you can use someting like this:

if( len(trim(Startdate)) = 0 or len(trim(Enddate)) = 0, '',

networkdays( Startdate, Enddate )

) as TimeTaken


Hope it helps.

3 Replies
agigliotti
Not applicable

Re: Need help on IF Logic

take a look at https://help.qlik.com/en-US/sense/April2018/Subsystems/Hub/Content/Scripting/DateAndTimeFunctions/ne...

you can use someting like this:

if( len(trim(Startdate)) = 0 or len(trim(Enddate)) = 0, '',

networkdays( Startdate, Enddate )

) as TimeTaken


Hope it helps.

arulsettu
Not applicable

Re: Need help on IF Logic

may be like this in qlik

if(isnull(Startdate) or isnull(Enddate),''

,if(Type='New' and Status='Completed',

NETWORKDAYS(Startdate, Enddate))

avkeep01
Not applicable

Re: Need help on IF Logic

Hi Mahitha,

you can try:

IF(Startdate>0 OR Enddate >0, IF(Type = 'New' AND Status  = 'Completed',NETWORKDAYS(Startdate,Enddate)))