6 Replies Latest reply: Jul 15, 2017 10:33 AM by omar bensalem

# Show two values in bar chart, in Qlik Sense

How can i show in bar chart two values (value & percentage), in Qlik Sense?

Thank you!

• ###### Re: Show two values in bar chart, in Qlik Sense

You can add the % besides the dimension values:

Example:

Dimension:

=[region]&' '&aggr(num((Sum([Car sales])/Sum({1}total [Car sales])),'# ##0,00%'),[region])

Measure:

sum("Car sales")

• ###### Re: Show two values in bar chart, in Qlik Sense

Hi Omar,

I have one dimension and more many measure on the same chart. How can I see for each other value & percentage?

Thank you!

Magdalena

• ###### Re: Show two values in bar chart, in Qlik Sense

Well you can add it in the dimension, like we already did:

=[OICA region]&'/Sales:'&aggr(num((Sum({1}[Car sales])/Sum({1}total [Car sales])),'# ##0,00%'),[OICA region])

&'/Prod:'&aggr(num((Sum({1}[Car production])/Sum({1}total [Car production])),'# ##0,00%'),[OICA region])

result:

The other way to do, to have to have both the measure and its % in the same chart; is to use a combined chart:

Example:

dimension: "Oica Region"

Measure 1 : sum(Car Sales)

Measure 2:

Sum("Car Sales") / sum( total "Car Sales") , format it as % ,choose a representation other than Bars (sthing different from the first  measure representation) and select "secondary axis"

result:

• ###### Re: Show two values in bar chart, in Qlik Sense

Hi Omar,

Thank you!!

Magdalena

• ###### Re: Show two values in bar chart, in Qlik Sense

here I would like to extend the question asked earlier.

My question is how to display relative percentage ?(i.e., display percentage only with the current selections,  not by taking all the whole dimension values)

For example,in the above chart if I selected only Africa, Americans, Europe the percentage for Europe should be displayed only by considering the selection items but not all items that are loaded in that dimension.