From reading that blog, I believe that the code should be something like:
IF( ValueList( 'Sales', 'Target' ) = 'Target', RGB(255,0,0), RGB(0,0,255))
But that still doesn't seem to be working... Am I misunderstanding what the blog is saying?
The data is formatted like:
Year | Store Name | Sales | Target
the blog you read is dealling with synthetic dimension eg you have sales per month for several years and you want lines per years. to compare sales per month for those différent years. In that case it's working.
may be try this
IF ( SUM (Target)>=0, RGB (255, 0, 0),if(SUM (Sales)>=0 , RGB (0, 0, 255)))
Hi Bruno, thanks for answering, however the problem with this expression is that the table is in the form:
Year | Sales | Target
2015 | 1000 | 900
2014 | 1500 | 1000
2013 | 2000 | 1500
So when you write the code IF ( SUM (Target)>=0, RGB (255, 0, 0), IF(SUM (Sales)>=0 , RGB (0, 0, 255))) then each line will have a target greater than zero so it will always be red. In other words, your code doesn't distinguish between the Sales and the Target columns, so it will always colour both bars either Red or Blue and not one of each.