Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I need to show for every day how many appliances are online for that day and the previous 7 days. Its basically cumulative sum but only for the previous 7 days.
Using this expression is shows the rolling sum and thats not what I need , I need it to calculate when I have 1,2,3,4,5 the result should be 1,3,6,10,15 and not 1,3,7,15,31
this is my expression and its doing rolling sum and not cummulative sum
rangesum(above(sum({$<Date=>} aggr(sum({$<Date=>} [unique_appliance_count]),[unique_appliance_count])),0,rowno()))
replace the rowno() function with the number of days you want to sum over: rangesum(above(sum({$<Date=>} aggr(sum({$<Date=>} [unique_appliance_count]),[Month-Year])),0,7))
replace the rowno() function with the number of days you want to sum over: rangesum(above(sum({$<Date=>} aggr(sum({$<Date=>} [unique_appliance_count]),[Month-Year])),0,7))
Thank you. But I tried that by putting 3 instead of rowNo and results are strange.
Above is the number of connected units and below it the accumulated count and numbers are wrong.