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

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Bar Chart Label, but Complex

Hi! I'm creating a bar graph and want to show a label with the total and then then the number of a subset of the total.

For instance, imagine Fruit is comprised of Oranges (20) and Apples (10). My bar chart would show Fruit = 30.  But instead of the label saying just 30, I want it to show 30 (10) to show the amount of apples as a subset.

Any ideas?

Thanks!

1 Solution

Accepted Solutions
Not applicable
Author

Isn't this what you want?

View solution in original post

4 Replies
Not applicable
Author

Where do you want to show the label? Values on Data Points?  You could do something like this in the expression:

dual ( 

          sum( fruits ) & '   ( ' & sum( {$<fruit_type={'apples'}>} fruits ) & ' ) '

          , sum( fruits )

)

You can read more about the dual() function in the QlikView Help ( F1 )


Not applicable
Author

Thanks Carlos! I should have been more detailed as the above was a great solution for the title of the graph but not for each individual bar.

I have attached a spreadsheet with the granularity that I was looking for out of the dual function. Your solution above worked well in that it showed 150 (100), the Total across Titles and the Total In Scope. However, I couldn't figure out how to make each bar show the same level of detail.

I would show the titles as the y axis to the flagpole. The Totals would be the shown, with the values in the parenthesis being in scope. For instance, the Director bar would show 60 (40).

Not applicable
Author

Isn't this what you want?

Not applicable
Author

Oh I see what I was missing now! Thank you!