Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
Hoping you can help with the below:
I'm trying to create some customized ranges,
However it is currently aggregating the Sum(Sales) into the one value and disregards the ranges:
if(Aggr(SUM(Sales),Country) > $(vRangeMax),'>'&$(vRangeMax),
if(Aggr(SUM(Sales),Country) < $(vRangeMin),'<'&$(vRangeMin),
if(Aggr(SUM(Sales),Country) > $(vRangeMin) and Aggr(SUM(Sales),Country) < $(vRangeMax),$(vRangeMin)&' - '&$(vRangeMax))))
I was able to find a solution by creating a Dimension instead of a Measure:
if(Sales >=$(vRangeMax),'> '&$(vRangeMax),
if(Sales <= $(vRangeMin),'< '&$(vRangeMin),'> '&$(vRangeMin)&' < '&$(vRangeMax)))
Hi, if each country sales is distributed in ranges it means that the sales are being grouped by something below country, it is by order? by customer? by product?
Add that field to the aggr to split the value, like:
if(Aggr(SUM(Sales),Country,Product) > $(vRangeMax),'>'&$(vRangeMax),...
Thanks but I have tried that before and it just shows a Null value...
Yes, in that case also the if should be inside the aggr:
Aggr(SUM(Sales)> $(vRangeMax),'>'&$(vRangeMax),...,Country,Product)
That did not work either unfortunately...
I have attached a sample of the data for reference.
Try below
=AGGR( if( SUM(Sales) > $(vRangeMax) ,'>'&$(vRangeMax)
,if( SUM(Sales) < $(vRangeMin),'<'&$(vRangeMin),'>'&$(vRangeMin) & '<'&$(vRangeMax) ) ) ,Country,Product)
I was able to find a solution by creating a Dimension instead of a Measure:
if(Sales >=$(vRangeMax),'> '&$(vRangeMax),
if(Sales <= $(vRangeMin),'< '&$(vRangeMin),'> '&$(vRangeMin)&' < '&$(vRangeMax)))
All this time I thought this is a dimension, it should be a dimension to split in different rows.
I'm not sure how that is working, it might work on individual Sales values, but not grouping by order, product or customer.