Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
knightwriter
Creator III
Creator III

Pie Chart

Hi All,

I want to create a pie chart with only certain values (peoples names) in a pie chart.

In my excel column I have a long list of names but only want to show 4 or 5 of these names in my pie chart. Any ideas how to create this?

As you probably know pie charts cant look awful with too much infomartion!

1 Solution

Accepted Solutions
its_anandrjs

Add calculated dimension for that like

=If([peoples names]= 'Name1','Name1',

  If([peoples names]= 'Name2','Name2',

  If([peoples names]= 'Name3','Name3')))

And click on Suppress When Value Null

View solution in original post

8 Replies
its_anandrjs

Add calculated dimension for that like

=If([peoples names]= 'Name1','Name1',

  If([peoples names]= 'Name2','Name2',

  If([peoples names]= 'Name3','Name3')))

And click on Suppress When Value Null

its_anandrjs

You can use SET analysis for this also which is better way of doing pie chart calculation

Dimention :- [peoples names]

Expression :- Sum( {<[peoples names] = {'Name1','Name2','Name3','Name4'}>} Values )

Not applicable

you can use dimension limit tab in chart properties

dimension properties.png

MK_QSL
MVP
MVP

Create a PIE Chart

USING a Calculated Dimension

Dimension

Use calculated Dimension as below

=IF(Match([People Name],'Name1', 'Name2', 'Name3', 'Name4'),[People Name])

Tick Suppress When Value is NULL

Expression

As per your requirements

USING a Set Analysis (Just an Example)

Dimension

[Customer Name]

Expression

SUM({$<[Customer Name] = {'Name1','Name2','Name3'}>}Sales)

Performance wise, set analysis is better compare to Calculated Dimension

Hope this helps...

Colin-Albert

Use dimension limits

knightwriter
Creator III
Creator III
Author

@ thanks for this, very much appreciated.

If one of the names is O'Malley for example, how do I work this into my equation as the ' is causing an error?

Thank you to the other people who have also responded.

MK_QSL
MVP
MVP

Something like below

SUM({<Name = {"O'Malley","O'Connor"}>}Sales)

its_anandrjs

Ok You can write like this for the

Dimension :-

= If([peoples names]='Name3','Name3',

  If([peoples names]='O'&Chr(39)&'Malley','O'&Chr(39)&'Malley',)) // For O'Malley type of string

Or

If you use SET analysis then you can do like

Dimension :- [peoples names]

Expression :- SUM( {< [peoples names] = {"O'Malley"} >} SaleValue )