Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Announcements
BI & Data Trends 2021. Discover the top 10 trends emerging in today. Join us on Dec. 8th REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Contributor III
Contributor III

Need to If Condtion when using Interval() in QlikSense

Hi All,

I have calculated Average  using Interval() in KPI and now i need to add extra condition for that KPI

1st Cond - Interval(avg((Start_Time- End _Time)),'hh:mm:ss')

2nd Cond - Date >= 07/01/2020.

I already have that 1st condition which gives average value (08:02:33) In KPI. Now i need to add 2nd condition in that KPI(Mentioned above as '2nd Cond').

Please help me with this

Thanks in advance!

 

Labels (3)
3 Replies
Highlighted
Partner
Partner

i am assuming you have a separate date field in your table and the date condition you mentioned not dynamic

Interval(avg(  {<Date={'>=$(=MakeDate(2020,7,1))'}>} (Start_Time- End _Time)),'hh:mm:ss')

Highlighted
Contributor III
Contributor III

Thanks for the reply @dilipranjith !

 Date is column name 

'07/20/2020' - I need to hard code this in my set expression in the report.

I need to just include date condition(ie., date >= '07/20/2020') inside the Avg calculation.

 

 

Highlighted
Partner
Partner

then above should work. make sure the date column is tagged as date (i.e.  $date $numeric...)