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

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
pankey01
Contributor II
Contributor II

Set a specific color to a manually calculated 'Others' Pie Slice

Hi Community,

I'm sure this question has been posted and answered somewhere else before - but I can't seem to figure it out.

I created a Pie Chart with :-

Calculated Dimension

=If(Aggr(RangeSum(Above(Sum([# Pie Transported Passengers]),0,RowNo()))/Sum(TOTAL [# Pie Transported Passengers]), [Pie Carrier Name])<= 0.51, [Pie Carrier Name], 'Others')


and Expressions

Sum ([# Pie Transported Passengers]) - Select 'Relative' and 'Values on Data Points'

if(Count (DISTINCT [Pie Carrier Name]) = 1, [Pie Carrier Name], 'Others') - Select 'Values on Data Points'


As you can see it generates perfectly according to the 'Data Appearance' under the 'Colors' tab



Is there a way that I can select the 'Others' Color from the 'Special Segments' under Colors for my manually calculated 'Others' Pie Slice?


If not maybe someone can guide me to set a specific color for my 'Others' Pie Slice?


At the moment I changed 'Color 6' to the 'Others' color to get the result I need





1 Solution

Accepted Solutions
Clever_Anjos
Employee
Employee

Please try this, that retrieve the Colors Tab palette

if(Count (DISTINCT Dim2) > 1, LightGray(), Color(RowNo()) )

View solution in original post

5 Replies
Clever_Anjos
Employee
Employee

Try using Background color at Expressions TAb

if(Count (DISTINCT [Pie Carrier Name]) > 1, LightGray()) // or other color

pankey01
Contributor II
Contributor II
Author

Awesome, Clever Anjos, it works - thank you very much!

It's actually pretty logical when I think about it now.

I checked for :- if(Count (DISTINCT [Pie Carrier Name]) = 0, $(vOthersColor))

Which now doesn't make any sense at all, because all the [Pie Carrier Name]'s not matching the aggregation are accumulated into 'Others' (may be a problem if  'Others' also counts to 1)

I've added if(Count (DISTINCT [Pie Carrier Name]) > 1, $(vOthersColor)) into the Background Color of my Expression

It shows my color perfectly in the 'Others' slice, my only problem now is that the other slices are all White.

Clever_Anjos
Employee
Employee

Please try this, that retrieve the Colors Tab palette

if(Count (DISTINCT Dim2) > 1, LightGray(), Color(RowNo()) )

Clever_Anjos
Employee
Employee

Attaching

Capturar.PNG

pankey01
Contributor II
Contributor II
Author

Than You Very Much Clever Anjos - This works perfectly