Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I am having trouble calculating/scripting the cumulative days at a specific depth in QlikView. I currently have an sql table which pulls in the date and the depth at that specific date. But instead of the date as a dimension I want a count of days up to that specific point.
An aggr(count(Days), Dim) brings in a total count of days which does not work for my analysis.
Ex:
Current:
Depth
1500
1000
500
3/1/2016 | 3/2/2016 | 3/3/2016 | 3/4/2016 | 3/5/2016 | days
Goal:
Depth
1500
1000
500
0 | 1 | 2 | 3 | 4 | 5 | days
Can someone please advise?
Thanks,
Jared
Maybe a calculated dimension like
Aggr( days -Min(TOTAL days), days)
edit: Take care that your days date field shows a numeric representation, e.g. by using a default DateFormat in your script
SET DateFormat = 'M/D/YYYY';
I not sure I understand your setting. Would you be able to share a qvw sample?