Hi again!!
First of all thanks for all helps.
I am going to expose my question and the solution I have found, I hope it will be uselfuness.
I have a "geography" dimension and a "multilevel" report like:
StateB 182400 ERROR!!!
regionc 120000 100%
city1 24000 20%
city8 60000 50%
regiond 24000 100%
city1 2400 10%
city2 9600 40%
city3 12000 50%
The objective was to show
"city % values respect region" and also
"region % values State", I just have got the first one with next query:
WITH
SET [LastLevel] AS '{[city1],[city2],..,[cityn]}'
// extract just Region parent of lastlevel.members
SET [RegionParent] AS '
GENERATE ([LastLevel],
{
ANCESTOR ( [Geo].CURRENTMEMBER,[Geo].[region])})'
// The same with State
Set [StateParent] AS '
GENERATE ( [LastLevel],{
ANCESTOR ( [Geo].CURRENTMEMBER,[Geo].[State])})'
Set [OrderLastInRegion] AS '
HIERARCHIZE ( { [LastLevel] , [RegionParent]})'
Set [RegionInState] AS '
HIERARCHIZE ([OrderLastInRegion] , [StateParent]})'
//create a calculated mesure respect Region Level
MEMBER [Measures].[% Sales respect Region] AS ' [Measures].[Sales] /( [Measures].[Sales], ANCESTOR ([Geo] ,[Geo].[region] ))', FORMAT_STRING = '#.00%'
SELECT {[Measures].[% Sales respect Region]}
ON COLUMNS,
{[RegionInState]}
ON ROWS
FROM
Thanks for all.
Jalca