Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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
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')
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))
no it does not unbfortunately for the same row
which value should be given when Date is null? You have given 0 but [0 - anydate] will always give you wrong results.
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