Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All, can someone help me to figure out the expression in Background Color section? I want to get something like this
So I create a histogram to show the distribution of sales for each customer. In dimensions, I use calculated dimension, class(aggr(sum(sales),customerID), 1000). The measurement/expression is count(distinct customerID). Then I got a histogram like above, now I want to show in histogram that x-axis value <5000 with red, otherwise green. Can someone help me with the expression in Background Color?
for example: IF (aggr(sum(sales),customerID)<5000, red(), green()) --this expression doesn't work
Thanks.
dont think additional aggr would work as you have bucketed it already.
i am assuming you want to mark each bucket where sum(Sales) for each customer is less than 5000
one work around would be to calculate average sale prize for each bucket which should satisfy the condition you want. something like
if(sum(Sales)/count(DISTINCT Customer)<5000,red(),green())
hope it works out
can you share a sample app?
Sorry, I think I can't due to company policy. Any questions I can answer?
Scrambling option available in Document properties/Scrambling.
dont think additional aggr would work as you have bucketed it already.
i am assuming you want to mark each bucket where sum(Sales) for each customer is less than 5000
one work around would be to calculate average sale prize for each bucket which should satisfy the condition you want. something like
if(sum(Sales)/count(DISTINCT Customer)<5000,red(),green())
hope it works out
This workaround looks working for my purpose. Thank you Dilip.
no problem. glad it worked out