Skip to main content
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

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
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

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
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))

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
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)

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful