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: 
rammiee93
Contributor II
Contributor II

How to create bars with column names in Bar chat?

sairam93_0-1683816874254.pngsairam93_1-1683816952408.png

 

 

Labels (3)
1 Solution

Accepted Solutions
Kushal_Chawda

@rammiee93 

Create a bar chart with below dimension

1) %time

2) =ValueList('yes','no','whatever')

Create below measure

=Pick(match(ValueList('yes','no','whatever'),'yes','no','whatever'),
sum(yes),sum(no),sum(whatever))

Go to properties ,Appearance->Presentation -> select "stacked"

In dimensions, select  =ValueList('yes','no','whatever') dimension as "stack" and % time dimension as "Bars"

 

View solution in original post

4 Replies
Kushal_Chawda

@rammiee93 

Create a bar chart with below dimension

1) %time

2) =ValueList('yes','no','whatever')

Create below measure

=Pick(match(ValueList('yes','no','whatever'),'yes','no','whatever'),
sum(yes),sum(no),sum(whatever))

Go to properties ,Appearance->Presentation -> select "stacked"

In dimensions, select  =ValueList('yes','no','whatever') dimension as "stack" and % time dimension as "Bars"

 

rammiee93
Contributor II
Contributor II
Author

New to Qliksense, Worked as expected. Thanks a lot!!

 

rammiee93
Contributor II
Contributor II
Author

rammiee93_0-1683863024502.png

But it messed up at the sorting. Can you help me with sorting, I want to do the sorting by the %time in asc 0, 0-25, 25-50,50-75,75-100,100

 

Kushal_Chawda

@rammiee93  you can either create sort weight from script with dual function like below

LOAD  if(%time = 0,dual ('0%',1), if(%time = '0%-25%',dual ('0%-25%',2),.....)))) as %time

Now call this in dimension which you can sort it Numeric ascending or descending

or you can use match function in Expression sorting option in chart

=match(only({1}%time),'0%','0%-25%',....)