Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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!
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.
Not sure but try this
Num(
Sum(SalesQuantity) / Sum(TOTAL <StoreType> SalesQuantity),
'##%',
'#,##0
'
)
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
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.