Median in tm1 using mdx sort
Posted: Thu Oct 05, 2017 12:47 pm
Hi ,
I need to find a median for customers in a 12 month period sales . I know we dont have a formula in tm1 for median . so for work around ,
I have the cube with customers, 12 month sales data. I am planning to write a ti process on the customer subset .
Take each customer and write a mdx which take that customer and the the 12 months and sort it by the sales amount in ascending order.
Then I would take subset's 5th and 6th element sales and divide by 2 and store the value .
Can anyone please tell me the mdx to sort the customer sales by 12 month to do a subsetcreatemdx .
{
ORDER(
{ TM1FILTERBYLEVEL(
{TM1SUBSETALL( [Product] )}
,0)}
, [Test].([Posting Measures].[Amount]), BDESC)
}
Instead of all product here I should give my tuple of a single customer and 12 months
How do i modify the above mdx
Thanks,
I need to find a median for customers in a 12 month period sales . I know we dont have a formula in tm1 for median . so for work around ,
I have the cube with customers, 12 month sales data. I am planning to write a ti process on the customer subset .
Take each customer and write a mdx which take that customer and the the 12 months and sort it by the sales amount in ascending order.
Then I would take subset's 5th and 6th element sales and divide by 2 and store the value .
Can anyone please tell me the mdx to sort the customer sales by 12 month to do a subsetcreatemdx .
{
ORDER(
{ TM1FILTERBYLEVEL(
{TM1SUBSETALL( [Product] )}
,0)}
, [Test].([Posting Measures].[Amount]), BDESC)
}
Instead of all product here I should give my tuple of a single customer and 12 months
How do i modify the above mdx
Thanks,