Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Histogram with multiple expressions.

Hello all,

I had a question, and I am not sure if this is possible to do within Qlikview.

This chart will look like bar charts put together sideways on the same dimensional axis (age range) and information on gender.....

Here is a rough visual of what I want.

         Male                          Female

             XXXX    I   <20    I    XXX

       XXXXXXXX   I   21-30  I   XXXXXX

    XXXXXXXXXX   I  31-40   I   XXXXXXXXXXX

         XXXXXXX   I   41-50  I   XXXXXXXXXXXXX

            XXXXX    I  51-60  I    XXXX

                XXX   I    >61   I    XXX

Now, I cant do this combinding two barcharts and having one of them being negative values, because then they will not share the same dimensional axis (age range) which could vary between genders depending on user selections made on other fields.

Also, when the user clicks on say the age range of '21-30', I want information for both genders to show up. I also need the user to be able to click one of the Male information bars and consequently filter out the Female information bars, and vice versa.

Currently, the closest Ive gotten would be to have side by side bar chart, but then you cannot separate by gender, you can only filter down by age range.

If anyone has any suggestions on how to do this or has a workaround, that would be great.

1 Solution

Accepted Solutions
Gysbert_Wassenaar

If you have a field for gender than the expressions can make use of that field. And if you use QV11 the gender field could also be used to show/hide the expressions depending on the selection made if you need that.


talk is cheap, supply exceeds demand

View solution in original post

7 Replies
Gysbert_Wassenaar

You could try using a straight chart with inline bars. See attached example. You'd use two expressions, one for male and one for female. In a straight table you can put the dimension with the intervals in the middle by dragging that column to the right place.


talk is cheap, supply exceeds demand
nicolett_yuri

You must follow the same idea, using two bar graphs, one with positive values ​​and the other with negative.

The problem of hiding when no value can be solved unchecking hide zeros and checking the zero bars.

Dimensions:

In the graph dimension using only age

Expressions:

sum( {$<Gender = {"Female"}>} Amount ) for Female Graph

sum( {$<Gender = {"Male"}>} Amount ) * -1 for Male Graph

When the user clicks on the bar, he is filtering only the age, so the filter will work for the two graphs.

Not applicable
Author

Thank you for the reply. However, while you can filter on age, you cannot have them filter by gender as well since its coded into the set analysis. I dont want to implement conditional shows with multiple charts, but I feel that may be the only way.

Not applicable
Author

That was a very nifty solution, thank you. It still would not be able to filter by gender if I apply it to my case, but its a better solution IMO than two bar graphs conjoined.

Gysbert_Wassenaar

If you have a field for gender than the expressions can make use of that field. And if you use QV11 the gender field could also be used to show/hide the expressions depending on the selection made if you need that.


talk is cheap, supply exceeds demand
Not applicable
Author

This is what I was looking for, thank you.

amien
Specialist
Specialist

Briliant. Thanks!