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: 
Not applicable

Issue on pie chart

Hi

i have requirement on pie chart

1)in my pie chart i have 5 regions for eg:North ,east ,West,South,central

2)each zone having different Values for eg:North=20%,south=30%,west=30%,east=10%,central=25%

now my requirement is

When ever i select any zone (east,west,north,south,central) my pie chart should show all the zones instead of selected zone and also it has to highlight the selected zone.

how to archive this ......

Thanks

12 Replies
sunny_talwar

Add set analysis to you expression to ignore any selection in zone field. If you expression was this:

Sum(Sales)/Sum(TOTAL Sales) -> Change it to Sum({<Zone>} Sales)/Sum(TOTAL {<Zone>} Sales)

For second part of your question, may be set color using background color

If(Sum(Sales) > 0, LightRed(), LightGray())

ramasaisaksoft

expression:-

sum({1}Sales) will give always full amount of data .

Anonymous
Not applicable
Author

try to follow the below mentioned steps to achieve above requirement:

1) create pie chart dim region and sum({1}Amount)

2)in the colour properties of the chart use below expressions


if(GetFieldSelections(Region)='4',rgb(102,255,102),rgb(98,138,183))

if(GetFieldSelections(Region)=5,rgb(102,255,102),rgb(252,115,98))

if(GetFieldSelections(Region)=6,rgb(102,255,102),rgb(125,152,35))

if(GetFieldSelections(Region)=7,rgb(102,255,102),rgb(210,173,0))

if(GetFieldSelections(Region)=8,rgb(102,255,102),rgb(65,160,115))

Data:

T1:

LOAD * INLINE [

    Region, orderDate, Product, Amount

    4, 1/4/2011, Case 4, 500

    5, 1/5/2011, Case 5, 200

    6, 1/4/2011, Case 4, 300

    7, 1/5/2011, Case 5, 400

    8, 1/2/2011, Case 5, 800

 

];

Exp:

sum({1}Amount)

Output:

no region is selected:

Img1.PNG

Region 4 is selected and it is highlighted in green and data for other region is also there

img2.PNG

now Region 5 is selected and it is highlighted in green and data for other region is also there

Img3.PNG

hope this will help you.....

Not applicable
Author

great

thanks

Not applicable
Author

Getfieldselections not working That is  if conditions

MarcoWedel

Hi,

another solution might be:

QlikCommunity_Thread_209989_Pic1.JPG

QlikCommunity_Thread_209989_Pic2.JPG

QlikCommunity_Thread_209989_Pic3.JPG

QlikCommunity_Thread_209989_Pic4.JPG

QlikCommunity_Thread_209989_Pic5.JPG

hope this helps

regards

Marco

Anonymous
Not applicable
Author

Plz share your expression....

Not applicable
Author

i have written some thing like  color(fieldindex('Zone',Zone)) in BG color

Not applicable
Author

Hi

i want all the colors in background not only white and selected color.