[Mondrian] periodstodate with non-Time dimensions

Julian Hyde jhyde at pentaho.com
Thu Sep 18 12:57:37 EDT 2008


You are correct on all points. Please log a bug. 

> -----Original Message-----
> From: mondrian-bounces at pentaho.org 
> [mailto:mondrian-bounces at pentaho.org] On Behalf Of John V. Sichi
> Sent: Wednesday, September 17, 2008 7:19 PM
> To: mondrian at pentaho.org
> Subject: [Mondrian] periodstodate with non-Time dimensions
> 
> PeriodsToDateFunDef.getResultType is currently insisting on a time
> dimension even when a level is specified:
> 
>          if (type.getDimension() == null ||
>              type.getDimension().getDimensionType() !=
>                  mondrian.olap.DimensionType.TimeDimension) {
>              throw 
> MondrianResource.instance().TimeArgNeeded.ex(getName());
>          }
> 
> The MSFT docs say "Returns a set of sibling members from the 
> same level 
>   as a given member, starting with the first sibling and 
> ending with the 
>   given member, as constrained by a specified level in the 
> Time  dimension."
> 
> http://msdn.microsoft.com/en-us/library/ms144925.aspx
> 
> But this article mentions that non-time dimensions can be used:
> 
> http://www.databasejournal.com/features/mssql/article.php/3073581
> 
> So I'm thinking the check above may be incorrect (I haven't 
> tried MSAS yet).
> 
> This comes up for us when a schema contains both fiscal and 
> non-fiscal 
> calendar dimensions; we don't declare the fiscal ones as type Time.
> 
> In passing, in this section:
> 
> http://mondrian.pentaho.org/documentation/schema.php#Time_dimensions
> 
> The table does not list TimeWeeks as an allowable levelType, but 
> TimeWeeks is used as a levelType in the example.
> 
> JVS
> 
> 
> _______________________________________________
> Mondrian mailing list
> Mondrian at pentaho.org
> http://lists.pentaho.org/mailman/listinfo/mondrian
> 
> 





More information about the Mondrian mailing list