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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Vedula_Srilekha
Contributor
Contributor

Multiple values in one measure

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.

 

 

Labels (6)
2 Replies
justISO
Specialist
Specialist

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:

justISO_0-1669645001956.png

Similar way would be to use Relative number modifier, but your data structure should be crosstable.

Or
MVP
MVP

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.