Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I have created an expression in a listbox that says:
=Aggr(Sum(Web_OrderValue), Web_CustomerId)
This is working and the result I get in my listbox is all DISTINCT OrderValues.
However the end user of my application want's to be able to use intervals instead in the listbox:
e.g.
0 - 99:-
100-299:-
300- 499:-
aso
Is there anyone that knows of a way to pull this off?
I thought of using LOAD INLINE mapping
1, ''0-99'
2, '0-99'
But there has to be a better way.
br
Martin
Perhaps this?
aggr(class(sum(Web_OrderValue),100),Web_CustomerId)
Hello,
Thank you for your reply.
It worked very well.
But if it is possible I would like to use these intervalls:
1-99
100-299
300-499
500-699
700-899
900-1099
1100-1999
2000-2999
3000-3999
4000-4999
5000-
The problem with your solution is that it requires that the intervalls are always of the same size and this is not the case for me.
Do you have any idea how to pull this off?
br
Martin
Brute force, I suppose.
aggr(if(sum(Web_OrderValue)<100,'1-99'
,if(sum(Web_OrderValue)<300,'100-299'
,if(sum(Web_OrderValue)<500,'300-499'
...
,if(sum(Web_OrderValue)<5000,'4000-4999'
,'5000+')))))))))),Web_CustomerId)
Hello again,
Thank you, it worked perfectly.
br
Martin