Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Announcements
Save the Date: QlikWorld Online, June 24-25, 2020. Free global virtual event for data integration and data analytic gurus. Register Today
New Contributor III

interval function not working properly

 

i am having a below chart

 

There are two calculations that i am trying to achieve the same result but can you help me understand why is it not giving me the same result

screenshot.PNG

 
 
 
 
 
 
 

 

Manual case creation(gives correct result)

=Interval( [collateral-valuation-reviewCaseCompleted-CPVT-REJECTED] - Min(HDR_TIMESTAMP) ,'hh:mm:ss')

 

manual case creation 2(giving no result)

=Interval(

AVG(Aggr(If(IsNull([collateral-valuation-reviewCaseCompleted-CPVT-REJECTED]), 0,
[collateral-valuation-reviewCaseCompleted-CPVT-REJECTED] - Min(HDR_TIMESTAMP)), HDR_CORR_ID))

, 'hh:mm:ss')

4 Replies
Highlighted
New Contributor III

Re: interval function not working properly

Just curious, but do you get a number if you remove the Interval() function? In other words, does this return a result?

=AVG(Aggr(If(IsNull([collateral-valuation-reviewCaseCompleted-CPVT-REJECTED]), 0, [collateral-valuation-reviewCaseCompleted-CPVT-REJECTED] - Min(HDR_TIMESTAMP)), HDR_CORR_ID))

 

Highlighted
New Contributor III

Re: interval function not working properly

no it does not unbfortunately for the same row

Highlighted

Re: interval function not working properly

which value should be given when Date is null? You have given 0 but  [0 - anydate] will always give you wrong results.

Highlighted
Digital Support
Digital Support

Re: interval function not working properly

Best way I was taught to work on these situations is to pull apart your expression into the smallest components and put those into Text Objects to check each component etc. and then put things back together one component at a time, that should help you figure out where things are going wrong, and then finding a solution should likely be easier.  You may want to have a look around the Design Blog area potentially, might be something out here that may help too:

https://community.qlik.com/t5/Qlik-Design-Blog/bg-p/qlik-design-blog

That area has over 700 posts from our internal experts and most are how-to related, so should be useful going forward on other things if nothing else, sorry not more direct help here, might help if you could attach a small sample QVW so folks could poke around in more detail on their own.

Regards,
Brett

To help users find verified answers, please do not forget to use the "Accept as Solution" button on any post(s) that helped you resolve your problem or question.
I now work a compressed schedule, Tuesday, Wednesday and Thursday, so those will be the days I will reply to any follow-up posts.