Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
mallikarjun_h
Partner - Creator
Partner - Creator

How to show performance category string values on top of each bar of bar chart

Hello,

Please find below description of requirement.

I have a employee data with rating given in integers between 1-3,

like :

Emplyee ID, Rating

1001, 1

1002, 2

1005, 1

 

I want to create a bar chart having Month as dimension & average of rating as measure.

But on top of each bar i don't want to show data values in numbers but in string format

e.g. 1 = Not Sufficient, 2 = good, 3 = Best

 

Anybody knows if there is any vizlib extension or any other extension or any way we can achieve this?

Labels (1)
3 Replies
SerhanKaraer
Creator III
Creator III

Hi,

You can change the measure's number formatting to "Measure expression" and write the measure expression as "Dual(pick(Avg(Rating),'not sufficient','good','best'),Avg(Rating))".  In this case your average rating must be an integer value; if it is not, you can use if statements for labeling the rating. Anyway the gist is use of dual.

mallikarjun_h
Partner - Creator
Partner - Creator
Author

Thanks for responding 🙂

I tried doing so but when i enable data values it shows numbers on bars like 1,2,3 or for that matter Y axis values are also 1,2,3.

I want the values to be show up in words like: good,best e.t.c.

SerhanKaraer
Creator III
Creator III

image.png

image.png

 

Dimension: EmployeeID

Measure expression: Dual(pick(floor(Avg(Rating)),'not sufficient','good','best'),Avg(Rating))

Y axis is formatted number, bar data values are formatted string.