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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

pie chart display only one segment.

hi community,

i have 4 regions , region1.==25%

                         region 2==25%

                         region3==25%

                         region4 ==25%

i need to display like this :

segment1:25%

segment2:75% (regio2+region3+region4)

region 1 is not largest or smallest value to do dimension limit option

thanks,

1 Solution

Accepted Solutions
lawrenceiow
Creator II
Creator II

Create your Pie Chart using Add Calculated Dimension

Use:   if(Aggr(Sum(1), Region)>0,Region,'Others')

The Expression in your Chart will be sum({<Region=>}Sales)

Replace Sales with whatever is your Measure.

Your Pie will appear as normal to start with - ie 4 regions with equal segments. Whichever segment you select, the others will be grouped together as a single segment.

View solution in original post

6 Replies
VishalWaghole
Specialist II
Specialist II

Hi,

You need to edit script for that,

Load        RegionColumn,

               if(match(RegionColumn,'region1'),'Segment1','Segment2') as RegionFlag

From        SourceFile;

then go to pie chart properties and drag RegionFlag as Dimension

and make your expression as it is.

If need more clarity then provide me some dummy data so i can help you.

-- Regards,

Vishal Waghole

Anonymous
Not applicable
Author

hi vishal ,

thanks for ur time ,its working fine as static report ,means  with out selections.

but if i select region 1,region2 its showing showing 100%

can u help me on this

VishalWaghole
Specialist II
Specialist II

Hi,

Make your expression as like,

=sum ({<RegionColumn = >} YourFactColumn)

if you want count then insted of sum write Count,

Only understand Set Analysis that i have used.

-- Regards,

Vishal Waghole

lawrenceiow
Creator II
Creator II

Create your Pie Chart using Add Calculated Dimension

Use:   if(Aggr(Sum(1), Region)>0,Region,'Others')

The Expression in your Chart will be sum({<Region=>}Sales)

Replace Sales with whatever is your Measure.

Your Pie will appear as normal to start with - ie 4 regions with equal segments. Whichever segment you select, the others will be grouped together as a single segment.

Not applicable
Author

you try calculated dimension like

if(match(region='Region1'),'Segment1','Segment2'))

Anonymous
Not applicable
Author

hi lawrence,

thanks for ur time.

pfa