Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
 Todd_D
		
			Todd_D
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		I have a Bar Chart with two dimensions (Provider and Date). I then have a measure that contains a set expression (sum({<Date={"<=$(vDOS)"} NetRevenue)). Then, I have an If Statement for the color of the bars (IF( Provider='ProvName',rgb(125,63,152),rgb(0,0,0)).
When I add a selection to the Date field, the dates outside the selected range turn black because the third section of the if statement says rgb(0,0,0). How can I keep the same colors (in this case, rgb(125,63,152)) regardless of the selections?
 
                
            
         Vegar
		
			Vegar
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		In your expression providing the result you have "filter" on which data to consider via the set expression, but in the coloring setup you the expression is not using the same "filter". Try applying the same set modifier to that expression as well.
(IF( only({<Date={"<=$(vDOS)"}>} Provider) ='ProvName',rgb(125,63,152),rgb(0,0,0))
 Digvijay_Singh
		
			Digvijay_Singh
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Can you share a sample app to understand the problem better, I don't understand the exact situations with the selections you really don't want black color, I assume as long as Provider is equal to hardcoded provider name, it should show the primary color irrespective of dates you are selecting, and if selected dates are not associated with the hardcoded provider name in your color expression I guess you want to show them in black color.
More details wud help to understand your situation better.
 Vegar
		
			Vegar
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		In your expression providing the result you have "filter" on which data to consider via the set expression, but in the coloring setup you the expression is not using the same "filter". Try applying the same set modifier to that expression as well.
(IF( only({<Date={"<=$(vDOS)"}>} Provider) ='ProvName',rgb(125,63,152),rgb(0,0,0))
 Todd_D
		
			Todd_D
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Thank you very much, this worked. Can you explain why you need the "only" function here?
