Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Sttran
Contributor
Contributor

Can I have 2 data labels on a stacked bar chart?

I have a stacked bar chart that shows sales by product by month. The first data label will be % of sales by product, this is easy to do. Is there a way to add a second data label with the expression to calculate average price using the formula of sales/item?

Labels (4)
2 Replies
igoralcantara
Partner - Specialist
Partner - Specialist

A Stack bar chart you can have either 2 dimensions OR 2 measures, not both. If you have one dimension, simply add a second measure. If you have 2 dimensions, change the ToolTip property, under the appearance area in the chart properties.

Check out my latest posts at datavoyagers.net
Lech_Miszkiewicz
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi @Sttran 

Normally you could use Dual() and Format number by "Measure expression" to achieve this

for example:

 

Dual(
	num(Sum(Expression1)/1000,'#,##0')&' ['& num(Sum(Expression2)/Sum(Expression1)*100,'#,##0 %')&']', // Label
	Sum(Expression1)	// Actual measure
)

 

however currently it appears Qlik Sense has a bug (which I have reported with Qlik support) when you switch to "stacked" mode it does not retain formatting.

Lech_Miszkiewicz_0-1716349268949.png

Therefore the only option you have at the moment is custom tooltip.

 

cheers Lech, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful to the problem.