Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

gsrchowdary
New Contributor

How to write if condition in setexpression

Hi Friends,

I want to display count of some ticketid based on difference of two date fields

=Count(DISTINCT {<Process={'Change'},[Call_Day of Month]=,Call_Month=,Call_Year=>}

if( Round ( Date(Date#([Scheduled Start Date Time],'MM/DD/YYYY hh:mm:ss TT'),'MM/DD/YYYY') -Date(Max(Call_Date),'MM/DD/YYYY'))>= 0 and

Round( Date(Date#([Scheduled Start Date Time],'MM/DD/YYYY hh:mm:ss TT'),'MM/DD/YYYY') -Date(Max(Call_Date),'MM/DD/YYYY'))  <=60,TicketID))

Please suggest me..

Thanks in Advance

Siva

2 Replies

Re: How to write if condition in setexpression

May be this:

=Count(DISTINCT {<Process={'Change'},[Call_Day of Month]=,Call_Month=,Call_Year=>}

If([Scheduled Start Date Time] - Max(Call_Date) >= 0 and [Scheduled Start Date Time] - Max(Call_Date) <= 60, TicketID))



Best,

Sunny

maverjannet
Valued Contributor

Re: How to write if condition in setexpression

hi, try

=

if( Round ( Date(Date#([Scheduled Start Date Time],'MM/DD/YYYY hh:mm:ss TT'),'MM/DD/YYYY') -Date(Max(Call_Date),'MM/DD/YYYY'))>= 0 and

Round( Date(Date#([Scheduled Start Date Time],'MM/DD/YYYY hh:mm:ss TT'),'MM/DD/YYYY')) -Date(Max(Call_Date),'MM/DD/YYYY'))  <=60,

Count(DISTINCT {<Process={'Change'},[Call_Day of Month]=,Call_Month=,Call_Year=>}TicketID))