Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
divya_anand
Creator III
Creator III

bar chart based on more than one selection in field.

Hello everyone,

In the attached report, when a selection is made in %Product, the bar chart displays the data for the chosen value. It works fine when I make a single selection in %Product. But what I want is - when more than 1 value is chosen in %Product, the bar chart should display a bar for each of the value chosen. For eg, when I choose 'one' and 'three' in %Product, I must see 2 bars for each country in the bar chart - one bar for "one" and another bar for "three". Is this possible? If yes, How?

Thank you.

4 Replies
sunny_talwar

May be try to add %Product as your second dimension and change your expression to this:

Sum({$<[ProductID] = p(%Prod)>}Quantity*UnitPrice)

Capture.PNG

divya_anand
Creator III
Creator III
Author

Hi Sunny,

This is close! One more thing:

Instead of just 1 expression, I will have 2. So, the 1st expression will be on the chart irrespective of the selections on %Product, while the 2nd expression changes based on selection in %Product. (Note: I would prefer grouped bar rather than stacked)

Thank you.

divya_anand
Creator III
Creator III
Author

And one more thing, Initially I would like to see only the 1st expression bar, and only on selection in %Product I should be able to see the bars with respect to expression 2. Is this possible?

The 2nd expression would be: Sum(Quantity*UnitPrice)

Thank you for your timely help.

jayaseelan
Creator III
Creator III

Hi,

I think this may be your output,

--> Add %Prod in another dimension

--> And use this Expression Sum(Quantity*UnitPrice)

Capture.PNG

Thanks,