Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello Everyone,
Hope you are doing great. I am trying to create a PIE chart from the below expressions.
Dimension Expression:
=if(aggr(rank(sum([Total AUM])),[Product ID])<= 5,'Top 5 Products',
if(aggr(rank(sum([Total AUM])),[Product ID])> 5 and aggr(rank(sum([Total AUM])),[Product ID])<= 10,'Top 5 to 10 Products','The Rest'))
Measure Expression:
sum([Total AUM])
But the issue is with the color by dimension. By default whole PIE chart is showing in GRAY color.
Is there any way that I can choose my interest in color for dimension expression. For Exp 'Top 5 Product = Blue', 'Top 5 to 10 Products=lightblue and 'The Rest = LightGray'.
Thanks in Advance!!
-Vidya
I was able to achieve this task with the below expression.
=if(max(aggr(rank(sum([Total AUM])),[Product ID]))<= vTopN,rgb(5,75,110),
if(max(aggr(rank(sum([Total AUM])),[Product ID]))> vTopN and max(aggr(rank(sum([Total AUM])),[Product ID]))<= vTopNtoN,rgb(7,197,222),rgb(117,117,117)))
Thanks,
-Vidya
Hi,
Try below method,
method 1: try to apply color by dimension using master item
method 2: background measure color as below expression
if(aggr(rank(sum(Sales)),Product)<= 5,Blue(),
if(aggr(rank(sum(Sales)),Product)> 5 and aggr(rank(sum(Sales)),Product)<= 10,LightBlue(),LightGray()))
also check this thread /post as well.
Color by expression ‒ Qlik Sense
Re: Problem with Color by Dimension
Thanks,Deva
Hi Deva,
Thanks for looking into this. I have already tried this logic. Still no luck. I guess I have to create the rank and buckets calculated columns from load script editor and use that as a dimension in color properties.
Thanks,
-Vidya
I was able to achieve this task with the below expression.
=if(max(aggr(rank(sum([Total AUM])),[Product ID]))<= vTopN,rgb(5,75,110),
if(max(aggr(rank(sum([Total AUM])),[Product ID]))> vTopN and max(aggr(rank(sum([Total AUM])),[Product ID]))<= vTopNtoN,rgb(7,197,222),rgb(117,117,117)))
Thanks,
-Vidya