
Re: using an expression(based on a dimension) as dimension for another expression
John Witherspoon Aug 12, 2011 5:34 PM (in response to xapharius)I would expect something like this to work:
dimension = aggr(class(count(distinct Object),10,'Objects'),Person)
expression = count(distinct Person)If it doesn't, I'll figure it out by working up an example.

using an expression(based on a dimension) as dimension for another expression
xapharius Aug 16, 2011 11:04 AM (in response to xapharius)Thanks a lot! It is working perfectly!

using an expression(based on a dimension) as dimension for another expression
xapharius Aug 29, 2011 10:39 AM (in response to xapharius)In same scenario I am now trying to make the chart show me the bell curve for the sales.
I am taking as a dimension aggr(count(distinct Object)), without using the class function.
But for the expression I can't use the normdist function since this is not cumulative.
I have tried writing a couple of distributions by hand but the results weren't that bellcurvelooking.
Count(distinct Person) by itself looks more like a bell curve than the attempts.
Is it somehow possible just to sort the chart in such a way that it shows the bell curve, rather than changing the expression?
Thanks Again!

using an expression(based on a dimension) as dimension for another expression
Stefan Wühl Aug 29, 2011 11:17 AM (in response to xapharius)I think aggr(count(distinct Object), Person) as dimension and Count(distinct Person) as expression should do the trick to show you the distribution. Check the sort of dimension in sort tab, I think it should be numerical only.
But maybe you actually don't get a bell curve? For example, if most customer buy only one Object and the probability of a customer buying 2,3,4,5,6.. is dropping (what I would expect, but don't know in your case), you won't get a bell curve. Hm, I just want to say that not every distribution follows a bell curve distribution (gaussian).

using an expression(based on a dimension) as dimension for another expression
xapharius Aug 29, 2011 12:00 PM (in response to Stefan Wühl )I think aggr(count(distinct Object), Person) as dimension and Count(distinct Person) as expression should do the trick to show you the distribution. Check the sort of dimension in sort tab, I think it should be numerical only.
I also think that that dimension and expression should do it, but the sort tab does't give me any option other than ascending/descending.
But maybe you actually don't get a bell curve? For example, if most customer buy only one Object and the probability of a customer buying 2,3,4,5,6.. is dropping (what I would expect, but don't know in your case), you won't get a bell curve. Hm, I just want to say that not every distribution follows a bell curve distribution (gaussian).
I understand what you are saying, and indeed in the end it may not be a gaussan distribution.
But I think that for a decent amout of input it will gradually get a bell form. Already for a relatvely small sample, sorted acending (_) i get a nice steady curve!

using an expression(based on a dimension) as dimension for another expression
Stefan Wühl Aug 29, 2011 12:04 PM (in response to xapharius)I would assume that sorting number of object Sales in ascending order would be ok? Like having a xAxis from 0 to max number of Sales.
How would you like it to be sorted?

using an expression(based on a dimension) as dimension for another expression
xapharius Aug 29, 2011 4:20 PM (in response to Stefan Wühl )Yes, you are right, I should leave it sorted like that. Trying to sort it some other way wouldn't bring much, other than make it confusing
Thank you for the fast replies!




