Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Calculated dimension grouping incorrectly

Hi Family, I have been battling with grouping values using a calculated dimension. So I created a the dimension and specified a set of values I want displayed, and also created an expression which simply gives me a count of all my customers. The issue is that not all values in my calculated dimension are distributed into their correct buckets:

Dimension

=if(Aggr(Sum(Amount),[Customer ID])>=0 and Aggr(Sum(Amount),[Customer ID]) < 1,Dual('R0 - R0',1),

  if(Aggr(Sum(Amount),[Customer ID])>=1 and Aggr(Sum(Amount),[Customer ID]) <= 10000,Dual('R1 - R10,000',2),

  if(Aggr(Sum(Amount),[Customer ID])>=10001 and Aggr(Sum(Amount),[Customer ID]) <= 50000,Dual('R10,001 - R50,000',3),

  if(Aggr(Sum(Amount),[Customer ID])>=50001 and Aggr(Sum(Amount),[Customer ID]) <= 250000,Dual('R50,001 - R250,000',4),

  if(Aggr(Sum(Amount),[Customer ID])>=250001 and Aggr(Sum(Amount),[Customer ID]) <= 500000,Dual('R250,001 - R500,000',5),

  if(Aggr(Sum(Amount),[Customer ID])>=500001 and Aggr(Sum(Amount),[Customer ID]) <= 3000000,Dual('R500,001 - R3mil',6),

  if(Aggr(Sum(Amount),[Customer ID])>=3000001,Dual('> R3 milllion',7),'')))))))

Expression

Count([Customer ID])

For instance, Some of my amount values that are less than 3 million are showing in the 3 million buckets and visa versa. Urgently need help on this and very much appreciate all the help I can get.

Thanks,

0 Replies