Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
 
					
				
		
Hello everyone,
I have to color a simple table with two colors. Every time that a value in a dimension change the color must be changed
like this:
,
Does someone have an idea?
Thank you in advance,
 
					
				
		
 marcus_sommer
		
			marcus_sommer
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Have a look here: Colors in charts
- Marcus
 Gysbert_Wassena
		
			Gysbert_WassenaYou could try something like this for the background color expression for the dimensions and expressions:
if(aggr(NODISTINCT Mod(RowNo(),2),Reference)>0,color(1),color(2))
 
					
				
		
Hi thank you for your answer but it seems like the aggr is not well calculated with big selection. When I have a selection of hundreds references I have some errors like bellow
if I select few references, it's working well:
The formula for the color is : =if(aggr(NODISTINCT Mod(RowNo(),2),U_DU_ID)>0,rgb(168,168,255),white())
Do you have an idea on this?
Thanks a lot,
 Gysbert_Wassena
		
			Gysbert_WassenaThe aggr function sorts by load order. Your table is sorted numerically descending. It's possible that this causes the mismatches. You could try to create a temporary table in the script that loads the U_DU_ID values in numerical order. create that table before you load the 'real' data. That way the aggr function will use that ordering.
 
					
				
		
 marcus_sommer
		
			marcus_sommer
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		With the newest releases it would be possible to sort an aggr: The sortable Aggr function is finally here!
- Marcus
