Hitachi Vantara Pentaho Community Forums
Results 1 to 2 of 2

Thread: Enable Relative Date Filters using a language other than English

  1. #1
    Join Date
    Aug 2011
    Posts
    3

    Default Enable Relative Date Filters using a language other than English

    Hi,
    I usually use this technique (https://help.pentaho.com/Documentati...20/070/030/000) for my date dimension and it works correctly.
    Here the dimension's definition:

    Code:
      <Dimension type="TimeDimension" visible="true" highCardinality="false" name="Date">
        <Hierarchy name="Date" visible="true" hasAll="true" primaryKey="date_id">
          <Table name="date_dim">
          </Table>
          <Level name="Year" visible="true" column="year" ordinalColumn="year" type="Integer" uniqueMembers="true" levelType="TimeYears" hideMemberIf="Never">
              <Annotations><Annotation name="AnalyzerDateFormat">[yyyy]</Annotation></Annotations>
          </Level>
          <Level name="Year Quarter" visible="true" column="quarter_of_year" ordinalColumn="quarter_of_year" type="String" uniqueMembers="false" levelType="TimeQuarters" hideMemberIf="Never">
            <Annotations><Annotation name="AnalyzerDateFormat">[yyyy].[yyyy 'Q'q]</Annotation></Annotations>
          </Level>
          <Level name="Year Month" visible="true" column="month_of_year" ordinalColumn="year_month_number" type="String" uniqueMembers="false" levelType="TimeMonths" hideMemberIf="Never">
            <Annotations><Annotation name="AnalyzerDateFormat">[yyyy].[yyyy 'Q'q].[yyyy MMM]</Annotation></Annotations>
          </Level>
          <Level name="Full Date" visible="true" column="date" ordinalColumn="date_id" type="Date" uniqueMembers="false" levelType="TimeDays" hideMemberIf="Never">
              <Annotations><Annotation name="AnalyzerDateFormat">[yyyy].[yyyy 'Q'q].[yyyy MMM].[yyyy-MM-dd]</Annotation></Annotations>
          </Level>
        </Hierarchy>
      </Dimension>
    Now I need to create a date dimension containing some values in a differente language (italian in this case).
    The dimension's definition in the schema doesn't change, the only things that change are the values of the month_of_year column. For example "2017 Jan" becomes "2017 Gen".

    After populating in this way the table date_dim the date filters in mondrian does't work anymore.
    If I try to filter, for example, for the previous 2 Full Date, I can see that the MDX query is setting the filter in this way:

    Code:
    SET [*BASE_MEMBERS__Date_] AS '{[Date].[2017].[2017 Q1].[2017 Jan].[2017-01-16],[Date].[2017].[2017 Q1].[2017 Jan].[2017-01-17]}'
    Of course this cannot work because the value of the level "Year Month" is "2017 Gen" and not "2017 Jan".

    What can I do to make this filter work?

    Thank you

    Clotis

  2. #2
    Join Date
    Aug 2006
    Posts
    287

    Default

    I believe this would be possible in 7.0 as analyzer.properties introduce a new behavior on that

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Privacy Policy | Legal Notices | Safe Harbor Privacy Policy

Copyright © 2005 - 2019 Hitachi Vantara Corporation. All Rights Reserved.