cancel
Showing results for 
Search instead for 
Did you mean: 

RSUM with Display Missing as Zero and BreakBy

wallingfordce
10 - ETL
10 - ETL

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. Anyone gracious who can expand the script to work over the break by?

wallingfordce_0-1669833150334.png

 

1 ACCEPTED SOLUTION

harikm007
13 - Data Warehouse
13 - Data Warehouse

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

 

View solution in original post

1 REPLY 1

harikm007
13 - Data Warehouse
13 - Data Warehouse

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