Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi. I have 3 brands in rows (dimensions) and values A, B, & C (measures) in 3 coloumns. I want to create a bar graph in Qlik Sense that shows the 3 brands in x-axis and the percentage of A, B, and C in y-axis for all the 3 brands. I have attached a screenshot of the data structure along with the desired graph.
Any suggestions would be of great help. Thanks.
Hi, try something like this: add Company as Bars Dimension. Add 3 Measures:
sum(A) / sum(A+B+C)
sum(B) / sum(A+B+C)
sum(C) / sum(A+B+C)
accordingly. Change all 3 measure Number Formatting to percentage. Now go to Appearance->Presentation choose 'Stacked' and 'Horizontal'. Enable 'Value labels', both, Segment labels and Value labels. Go to Sorting, choose Company, enable Custom sorting and everywhere choose Descending. Done:
Similar way would be to use Relative number modifier, but your data structure should be crosstable.
Minor thing to add - it's usually better to use Sum(RangeSum(A,B,C)) rather than using addition, since this will handle cases where one of A, B, or C are null in a row.