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: 
Anonymous
Not applicable

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
sunny_talwar

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

Anonymous
Not applicable
Author

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))