Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have a dimension in pivot table which needs to be have different color codes based on the dimension value.
Eg:
If(Country = 'US','RGB(255,0,0)', If(Country = 'EU','RGB(0,255,0,)',RGB(0,0,255)')
The Background color in dimension works only for 1 color code and does not work for multiple if conditions. How can this be achieved.
Hi,
I used Pick Wildmatch , below is the code for the same wich i added for both dimension Background color expression, You can use # color also example: #ccc etc...
pick(WildMatch(Dim1,'A','B','C','D'),'red','blue','green','#ccc')
It should workfor multiple conditions. But I see one issue in your expression: you should not have single qoutes around the rgb function. Do it like this: if(country='US', rgb(255,0,0), if(...
You could also use pick and match as Ajaykakkar93 suggested, but it doesn't have a fallback for "all other countries" like the if statement does.
@henrikalmen & @ajaykakkar93 My condition for dimension coloring is :
if(num(Score, '#.##')>=3.30,'#00FF00',
if(num(Score, '#.##')>=2.30,'#FFFF00','#FF0000'
))
But this is not working. It always goes to else condition.
if(num(Score, '#.##')>=3.30 and num(Score, '#.##')<2.30,'#00FF00',
if(num(Score, '#.##')>=2.30 and num(Score, '#.##')<3.30,'#FFFF00','#FF0000'
))
Try this
@neerajthakur I tried it, but it just doesn't work. I tried different combination of numbers like :
if(num(Risk_Score, '#.##')=3.30 ,'#00FF00',
if(num(Risk_Score, '#.##')=1.70 ,'#FFFF00'
))
Try this:
if(num(num#(Risk_Score), '#.##')=3.30 ,'#00FF00',
if(num(num#(Risk_Score), '#.##')=1.70 ,'#FFFF00'
))
Hi try this and let me know the output where value is 3.30
if(Risk_Score=3.30,red(),blue())
@neerajthakur Its not working either. I tried
1) =if([Workload.Risk_Score]=2.40,red,blue)
This says "Error in expression".
2) =if([Workload.Risk_Score]=2.40,'#00FF00','#FFFF00')
It always goes to Else part.
Try with value which you have like 3.30 and 1.70,1.20 and use this red(),blue(),
The field you are using for coloring is it dimension or measure, if measure what's the expression.
It might be you are using some calculation for measure value and using different logic in color expression.
I can't see the search icon and hoping it's measure only. Share your measure expression to help better.