Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
paulista
Contributor III
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')

Labels (2)
4 Replies
billbois
Creator
Creator

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

 

paulista
Contributor III
Contributor III
Author

no it does not unbfortunately for the same row

Kushal_Chawda

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

Brett_Bleess
Former Employee
Former Employee

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.