Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Connect 2026 Agenda Now Available: Explore Sessions
cancel
Showing results for 
Search instead for 
Did you mean: 
Amit_B
Creator III
Creator III

Different format for Segments & Totals in Stacked Bar Chart

Hi,

I have a stacked bar chart with two dimensions (Store Type and Customer Type), and one measure (Sales Quantity).
I want to display the segment labels (the breakdown by Customer Type within each Store Type) as percentages, while showing the total labels (the total sales per Store Type) as absolute numbers.

For example, in Store Type A there were 500 sales in total - 150 sales from Customer Type S (which is 30%), and 350 sales from Customer Type L (which is 70%).
In the segments, instead of showing the absolute values (150 and 350), I want to show their percentages of the total (30% and 70%).

Is there a recommended approach to achieve this?

Thanks!

Labels (3)
1 Solution

Accepted Solutions
Amit_B
Creator III
Creator III
Author

You were close.
I needed to use the Dual() function, where I set the first parameter as percentage and the second as a number.
Thank you.

View solution in original post

3 Replies
Chanty4u
MVP
MVP

Not sure but try this 

Num(

    Sum(SalesQuantity) / Sum(TOTAL <StoreType> SalesQuantity),

    '##%',

    '#,##0

'

)

robert_mika
Master III
Master III

One of the viz in link has solution where a hidden dim has the % value(go the the bottom of the link) https://community.qlik.com/t5/Member-Articles/Top-10-Viz-tips-part-IX-Qlik-Connect-2025/ta-p/2509324

Amit_B
Creator III
Creator III
Author

You were close.
I needed to use the Dual() function, where I set the first parameter as percentage and the second as a number.
Thank you.