Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I am creating a report where it shows me the number of disputes within the first 30 days, 60 days, 90 days ect...
To get this I am getting the days between the dispute filed date and the date we created the account.
I was going to do a long formula saying if days are between 0-30 then it's month 1, 31-60 it's month 2, ect...
-Is there a script that can do this easier and am I taking the long way to my results?
-Does anyone have an example of script they use for something similar?
I actually ended up going with this and it seems to have worked fine:
It sounds like the CLASS() function may give you the desired result.
cheers,
Oleg Troyansky
Upgrade your Qlik skills at the Masters Summit for Qlik - coming soon to Milan, Italy and Austin, TX!
Maybe with the class function (it works in chart too)
x:
load
*,
Class(date2-date1, 30) as int;
load
date(makedate(2015)) as date1,
date(makedate(2015) + floor(rand()*365)) as date2
AutoGenerate 1
While IterNo() <= 730;
I'm actually looking for each record to contain who many months it took until it had a dispute (if it had one)
See below:
Hi,
one solution could be:
Div([Dispute Date]-[Create Date],30)+1
hope this helps
regards
Marco
I actually ended up going with this and it seems to have worked fine:
glad you found a solution.
please close your thread and feel free to select helpful answers.
thanks
regards
Marco