Discussion board where members can get started with Qlik Sense.
I am new to Qlik Sense but I try to do the following:
ID: Month: Minutes: Total minutes:
1 Jan 10 10
1 Feb 15 25
1 March null 25
2 Jan 20 20
2 Feb null 20
2 March null 20
3 Jan 5 5
3 Feb 10 15
3 March 15 30
I tried this formula that I found in another post:
rangeSum(Minutes) AS Cumulative . But this only returns 0 for the null values.
How can I use this rolling sum with a break and nulls?
Thanks for your help
Go to Solution.
Use this script in the backend
id, month, minutes
1, Jan, 10
1, Feb, 15
2, Jan, 20
3, Jan, 5
3, Feb, 10
3, March, 15
if(id=Previous(id),rangesum(peek('TotalMinutes'),minutes),minutes) as TotalMinutes
Order by id;
Drop Table temp;
Take dimension as id and month.
Expression 1 = minutes
Expression 2 =rangesum(Above(Sum(minutes),0,RowNo()))
You will get your desired output.
Thanks for your quick reply. But I simplified the issue a bit, I shoudn't have... But when I add an aditional column I get the following result:
I would like to add a couple of other columns as well. Would that be an issue? Or can I pre calculate this in my load script and then join my data to my main table?
let's try using the below expression:
rangesum( Above( total Sum(minutes), 0, 12 ) )
I hope it helps.
Thank you for the example. It works great!