Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
GeorgeKokkinopoulos
Contributor II
Contributor II

Trying to put values and percentages in a Stack Bar Chart. Dual function first argument not work

Hi,

I am trying to create a Stack Bar Chart to show not just the values of my measure but also the percentage share of each category in the bar. I have tried the following:

Dual(Num(Sum(QTY),'#,###')&Chr(10)&Num(Sum(QTY)/sum(total <PRODUCT >QTY),'##.#%'),Sum(QTY))

I only get the Stack Bar Chart for QTY (Quantity) as if I hadn't used the Dual function at all. I have also tried setting number formatting to "measure expression" but still nothing.

I also experimented by swapping the arguments in the Dual (see below):

Dual(Sum(QTY),Num(Sum(QTY),'#,###')&Chr(10)&Num(Sum(QTY)/sum(total <PRODUCT >QTY),'##.#%')) but then I only got a different Stack Bar Chart showing the percentages but not the quantity, hence the title of the subject (first argument doesn't work).

I believe this works in Qlik View. What about Qlik Sense? Am I missing something in the expression?

Thanks

George

 

 

4 Replies
y_grynechko
Creator III
Creator III

Hey,

you are 2nd person today to ask for similar thing.

https://community.qlik.com/t5/New-to-Qlik-Sense/Need-to-change-the-Percentage-value-into-Number/m-p/...

That is the closes you can get to showing both: Value and Percentage. Other than that you would need to use external extension. I think that the bar chart from vizlib allows you to show both values. 

GeorgeKokkinopoulos
Contributor II
Contributor II
Author

Thanks. I have already done that but this is not enough as I need both values and %. I will try vizlib as soon as I can and let you know if it worked.

George

y_grynechko
Creator III
Creator III

Capture.PNG

blewis60
Contributor II
Contributor II

I am having this exact same issue.  Did you ever find a solution?