Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
wossenhh
Creator
Creator

Top 5 and Bottom 5 bar chart in color

Hi,

I was trying to create a bar chart that displays the top 5 employee in Green and the bottom 5 employee in Red color in one chart. I have one dimension (Employee) and the expression is the utilized hours that used by employee in percentage. Can anybody please tell me how to do it?

I was using the following in expression Background color:

'If (Rank(Sum(vTotalUtilization)) <6, Green(), if (Rank(Sum(vTotalUtilization)) > 5, Red())), but it turns out every bar's in Red color.

Please help.

Thanks

14 Replies
cfz
Former Employee
Former Employee

Hi Wossen,

Your expression is fine if you use the field with the utilized hours (see example attached).

I hope it helps.

Carlos

wossenhh
Creator
Creator
Author

Hi Carlos,

Thanks for your quick reply. The problem I have from this expression when I sorted by Y-value in Descending order, I could able to see the top 5, but the bottom 5 bars are not accurate. For example if I have 15 values and want to show the top 5 and bottom 5 values after enabling the X-Axis Scrollbar, I have to move the scroll bar to the right to see the lowest value. Is there any other way to tackle this?

Thanks,

Wossen

cfz
Former Employee
Former Employee

Hi Wossen,

You can choose to show only the top 5 and the bottom 5 as in the example.

I hope it helps.

Carlos

wossenhh
Creator
Creator
Author

Hi Carlos,

Yes, this does help and thanks so much! One more thing though, I know how to add a reference line on a chart to show the targets or goals. But I don't know how to add a range, for example from your example, how to show a target utilization range hours that highlighted between 15-20?

Thanks,

Wossen

cfz
Former Employee
Former Employee

Hi Wossen,

You can use two reference lines to show the range. If this is not what you mean, please provide a picture because I am not sure I understand what you are  trying to obtain.

Carlos

Not applicable

Hi,

Regards.

wossenhh
Creator
Creator
Author

Hi Carlos,

Yeah, I can use two reference lines as you stated, but I want to display one solid line between 15 and 20. I don't know if that could possible.

I really appreciate for your help Carlos!

Thanks,

Wossen

wossenhh
Creator
Creator
Author

Thanks Ernesto.

cfz
Former Employee
Former Employee

Hi Wossen,

You can try to put a text object or a line object on top as in the attched example.

Carlos