Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
arvindjha2050
Creator
Creator

Percentage in Bar Chart

Hello Team,

I have a simple query which i will explain through sample data :

   

GeographySales
US90
UK70
APAC30
MEA10

The requirement is to create a bar chart in Qliksense with below parameters :

Dimension : Geography

Measure : Sales

Current we can enable data points on bar chart which shows the values but we want percentage contribution to be shown besides it like say for US : 90(45%) ,UK : 70(35%) etc etc.

Any help regarding same is highly appreciated.

Thanks & Regards,

Arvind Kumar Jha

8 Replies
Anonymous
Not applicable

Hi Arvind,

Use this

Sum({<>} Sales) / Sum(Total{<>} Sales) and make Number Format as % in dimention properties


Regards,

Sadasiva

dan_sullivan
Creator II
Creator II

To my knowledge you are unable to do that in qlik sense (control the hover text).  you could create a second measure for the calculation but then would have to have two bars on the chart.

Anonymous
Not applicable

I am sorry, i read it wrong. You can use my expression in color by expression option it will give you two measures together.

Hope thos helps.

Regards,

Sadasiva

arvindjha2050
Creator
Creator
Author

Hello Sada Shiv,

I created a master measure and wrote the above formula but it did not work.

Thanks,

Arvind

pathiqvd
Creator III
Creator III

Hi,

Try this in dimension,

=Geography

&':'&aggr(sum(Sales),Geography)&'('&num(aggr(sum(Sales),Geography)/aggr(sum(all Sales),Geography),'##%')&')'

Regards,

arvind_patil
Partner - Specialist III
Partner - Specialist III

Hi Arvind ,

Please try below Code:

Sum(Sales) / Sum({1} Sales)   Number format select % in measures


Thanks,

Arvind Patil

vijetas42
Specialist
Specialist

Hi,

Please use Sum(Sales)/Sum(Total Sales) expression in chart measure and change the number format as %.it will give you the expected output.

arvindjha2050
Creator
Creator
Author

Hello Lakshmipathi,

Thanks for the reply

The above calculation is correct but when taken as dimension it increases the length of each value of dimension and values are at bottom.

Basically we want value at top something like below value and percentage side by side and geography name at bottom: