[Mondrian] Unique Member Names for Calculated Fields in Mondrian 4

Julian Hyde julianhyde at gmail.com
Wed Jan 20 13:13:42 EST 2016


Try changing this line:

  <Hierarchy name="Test Date" visible="true" hasAll="true">

to hasAll="false" and see whether you can resolve [Test Date].[Test
Date].[1997].

Andy is correct that it is best practice to qualify with the level
then use key format <dimension>.<hierarchy>.<level>.<key>, e.g.
[Time].[Monthly].[Month].&[12]&[1997] -- Mondrian can resolve this
faster, especially in large dimensions -- but I wouldn't sweat it.
It's OK to use the <dimension>.<hierarchy>.<member name>[.<member
name>]... format.

In your case, you are wanting Mondrian to look past the [All Time]
member to the [1997] member below it. Apparently it doesn't do this.
It seems a reasonable enhancement but I might be wrong.

Julian



On Wed, Jan 20, 2016 at 2:09 AM, Tom Barber <tom at analytical-labs.com> wrote:
> Hello Folks
>
> Trying to debug a problem that has cropped up in Mondrian 4.
>
> I have a schema that looks like this:
> https://gist.github.com/buggtb/6173b6ed547e0be77ce4
>
> And as you can see there is a calculated column that extracts the year from
> a date.
>
> The queries run, but when you use Saiku to select a member the unique name
> for the Year is [Test Date].[Test Date].[1997] which fails because it
> reckons is doesn't exist. That said, [Customers].[Customers].[USA] does
> exist, so for normal members it is fine. Anyway, if I drop to an MDX query,
> indeed:
>
> WITH
> SET [~COLUMNS] AS
>     {[Customers].[Customers].[USA]}
> SET [~ROWS] AS
>     Hierarchize({[Test Date].[Test Date].[1997]})
> SELECT
> NON EMPTY CrossJoin([~COLUMNS], {[Measures].[Unit Sales]}) ON COLUMNS,
> NON EMPTY [~ROWS] ON ROWS
> FROM [Sales]
>
> Doesn't work, but:
>
> WITH
> SET [~COLUMNS] AS
>     {[Customers].[Customers].[USA]}
> SET [~ROWS] AS
>     Hierarchize({[Test Date].[Test Date].[Year].[1997]})
> SELECT
> NON EMPTY CrossJoin([~COLUMNS], {[Measures].[Unit Sales]}) ON COLUMNS,
> NON EMPTY [~ROWS] ON ROWS
> FROM [Sales]
>
> Does. So from my point of view there is an issue with the member lookup.
> Anyway, does anyone have any bright ideas as a workaround/fix?
>
> Thanks
>
> Tom
> --------------
>
> Director Meteorite.bi - Saiku Analytics Founder
> Tel: +44(0)5603641316
>
> (Thanks to the Saiku community we reached our Kickstart goal, but you can
> always help by sponsoring the project)
>
> _______________________________________________
> Mondrian mailing list
> Mondrian at pentaho.org
> http://lists.pentaho.org/mailman/listinfo/mondrian
>


More information about the Mondrian mailing list