Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I am using below expression se set colors for my bar chart.
Measure expression for color:
if(WildMatch(SkillsetName,'*HH*'), RGB(0, 32, 74),
if(WildMatch(SkillsetName,'*H*'), RGB(50, 136, 189),
if(WildMatch(SkillsetName,'*M*'), RGB(169, 204, 227),
if(WildMatch(SkillsetName,'*L*'), RGB(245, 183, 177),
RGB(250, 219, 216)))))
Bars Expression:
=if(WildMatch(SkillsetName,'*HH*'), 'High High',
if(WildMatch(SkillsetName,'*H*'), 'High',
if(WildMatch(SkillsetName,'*M*'),'Medium',
if(WildMatch(SkillsetName,'*L*'),'Low',
'Others'))))
here i am not able to see colors based on the expression. can anyone please suggest what i am missing here.
thanks in advance.
Try another approach: first, convert your bars expression (=if(WildMatch(SkillsetName,'*HH*'), 'High High',...) to Master Item (as dimension). In master item properties set color Values for each dimension manually. You'll need to convert your RGB code to HEX:
Now create this bar chart as 'Bars' using your Master Item dimension, and under 'Colors and legend' set color to 'Custom' by your 'bars expression' dimension:
Hi, can it be that you missing comparison part with each WildMatch?, f.e.
if(WildMatch(SkillsetName,'*HH*')>0, RGB(0, 32, 74),
if(WildMatch(SkillsetName,'*H*')>0, RGB...
Thanks for your reply. I tried replacing with below.
=if(WildMatch(SkillsetName,'*HH*')>0, RGB(0, 32, 74),
if(WildMatch(SkillsetName,'*H*')>0, RGB(50, 136, 189),
if(WildMatch(SkillsetName,'*M*')>0, RGB(169, 204, 227),
if(WildMatch(SkillsetName,'*L*')>0, RGB(245, 183, 177),
RGB(250, 219, 216)))))
Below is how it looks post updating.
The default ones is like below: also I want to keep the Legend as well. How this can be done ?
thanks
Hi,
I hope the solution below is effective for you.
you can simply use the code below to add a final dimension to the script component. When you have a finished field, you can make a master dimension and give the values in that field the color of your choice.
if(WildMatch(SkillsetName,'*HH*'), 'High High',
if(WildMatch(SkillsetName,'*H*'), 'High',
if(WildMatch(SkillsetName,'*M*'),'Medium',
if(WildMatch(SkillsetName,'*L*'),'Low',
'Others')))) as SkillsetName
After that, you can utilize that field as a secondary dimension in the dimension section.
Try another approach: first, convert your bars expression (=if(WildMatch(SkillsetName,'*HH*'), 'High High',...) to Master Item (as dimension). In master item properties set color Values for each dimension manually. You'll need to convert your RGB code to HEX:
Now create this bar chart as 'Bars' using your Master Item dimension, and under 'Colors and legend' set color to 'Custom' by your 'bars expression' dimension:
This is ideal solution in my scenario i think. I never explored the color property where these conditions were visible and we can set custom hex codes for each dimension label. Thanks a lot 🙂