Skip to main content
Announcements
Meet the 2024 Qlik Luminaries and Partner Ambassadors! READ ON!
cancel
Showing results for 
Search instead for 
Did you mean: 
msbhuvanesh003
Contributor III
Contributor III

Dynamic Pie chart

Hi all,

I want to show a pie chart based on my filter pane selection (using qlik sense).

Initially my chart will be 100% with 1 colour, as i select country from the filter pane the pie chart should automatically adjust based on the country i have selected.

Default Selection :

1.JPG

After selecting india from the filter pane the graph should look like this

2.JPG

If i added another country then

3.JPG

Can anyone please help me to achieve the same, if I remove the same also the graph should update.

Thanks

Nicil

9 Replies
Anil_Babu_Samineni

Please post sample QVW

Please add me Anil_Babu_Samineni to interact faster when reply back. Speak low think High.

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
msbhuvanesh003
Contributor III
Contributor III
Author

Hi Anil,

Thanks for the reply,

I have found one method,

=IF (WildMatch(GetFieldSelections(Country, ',', 100), '*' & Country& '*'), GetFieldSelections(Country, ',', 100), 'Rest Of Country')

If i give like this then all the countries are appended to the pie chart like bangladesh, india, australia.....

1.JPG

Is there any expressions we can use?

Thanks

Nicil

Anil_Babu_Samineni

Can you share QVW file, We are fine even Scramble data

Please add me Anil_Babu_Samineni to interact faster when reply back. Speak low think High.

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
balabhaskarqlik

On what basis, the share percentage of 2nd and 3rd pic are same for single & even for multiple countries.

msbhuvanesh003
Contributor III
Contributor III
Author

Please check the attached sample data

msbhuvanesh003
Contributor III
Contributor III
Author

I have attached an excel with the selection, can you please check

Anil_Babu_Samineni

Create Pie chart using below concept and check.

Dimension

=If(GetSelectedCount(Country)>1 and Match(Country,$(=Concat(Chr(39) & Country & Chr(39),','))),Country)

Expression

If(GetSelectedCount(Country)>1,Sum(Count),Sum(Count))

Or

If(GetSelectedCount(Country)>1,Sum({<Country={$(=Concat(Chr(39) & Country & Chr(39),','))}>} Count),Sum(Count))

Please add me Anil_Babu_Samineni to interact faster when reply back. Speak low think High.

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
msbhuvanesh003
Contributor III
Contributor III
Author

Hi Anil,

Sorry for the late reply,

Its working but if we haven't selected any country, it shows as incomplete visualization.

Capture.JPG

Thanks

Anil_Babu_Samineni

Please check attachment and use dimension as below

=If(GetSelectedCount(Country)>1 and Match(Country,$(=Concat(Chr(39) & Country & Chr(39),','))),Country,Country)

Please add me Anil_Babu_Samineni to interact faster when reply back. Speak low think High.

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)