Forum Discussion

wallingfordce's avatar
wallingfordce
Data Pipeline
11-30-2022
Solved

RSUM with Display Missing as Zero and BreakBy

I got ahead of the user on this one... Solved: RSUM with Display Missing as Zero - Sisense Community ...and found out only after getting a great solution that the user has a field in the Break By. ...
  • harikm007's avatar
    12-23-2022

    Hi wallingfordce ,

    Try this script:

    widget.on('processresult', function(se, ev){
    	
    	$.each(ev.result.series, function(seriesIndex, seriesValue){
    		
    		var prevValue = seriesValue.data[0].y
    
    		$.each(seriesValue.data, function(index, value){
    			if(value.y == null)
    				value.y = prevValue
    			else
    				prevValue = value.y	
    		})
    	
    	})	
    
    })

    -Hari