+38 (067) 282-63-66

office@bitimpulse.com

  • Ua
  • Ru
  • En

Select members for date type hierarchy in BAT as date range

In order for BAT to be able to set a date range selection

it is necessary that the dimension be designed accordingly.

The date key must be in the YYYYMMDD format, the week key in the YYYYWW format, the quarter key in the YYYYQ format, the month key in the YYYYMM format, and the year key in YYYY format. The recommended key type is Integer. In addition, there should be a comment for the hierarchy that specifies which level is responsible for the day, which for the week, which for the month, which for the year, for example: « [YMD=Day, YW=Week, YQ=Quarter, YM=Month, Y=Year] », where Day, Week, Quarter, Month, Year are the names of the corresponding levels. All 5 levels do not have to be present. If the name of one of the levels contains spaces, then it must be enclosed in square brackets […].

Tabular cubes do not have a Description field in multi-level hierarchies, but attribute hierarchies have this field. Therefore, you should write your desired comment in the properties for the corresponding attribute hierarchy in the Description field:

If the client made a mistake when setting the description of the hierarchy in the cube, then he will receive an error log with the following content:

<?xml version=”1.0″ encoding=”utf-16″?><root> <LogRecord Date=”2015-09-11T10:14:17″ Place=”DimensionsMeasuresBusiness.DataInit” Level=”Error”>

<ApplicationUserInfo FirstName=”Lena” LastName=”Vayda” Login=”root” Telephone=”” Email=”lvayda@bitimpulse.com” />

<Message>Incorrectly set description for the hierarchy in the cube for date range.</Message>

<SystemInfo>

<User>URANUS:lvayda@BIT</User>

<Version>4.120.0.0</Version>

<Process>[4924] C:\Program Files\Business Analysis Tool\4.120.1.0\Admin\BATAdmin.exe (4.120.1.0)</Process>

<ThreadID>10</ThreadID>

</SystemInfo>

<Exception>Server: uranus\sql2008; Database: Adventure Works DW 2008R2 Folders; Cube: Adventure Works Following hierarchies has incorrectly set levels:

[Date].[Calendar]: Clendar Year;

[Delivery Date].[Calendar]: Clendar Year;

[Ship Date].[Calendar]: Clendar Year;

</Exception>

</LogRecord>

</root>

It means that

Server: uranus\sql2008;

Database: Adventure Works DW 2008R2 Folders;

Cub: Adventure Works

contains hierarchies that have incorrect levels:

[Date].[Calendar]: Clendar Year;

[Delivery Date].[Calendar]: Clendar Year;

[Ship Date].[Calendar]: Clendar Year.

How to fix it?

In our case, the log is about description. Therefore, opening Microsoft Visual Studio, we see that the Calendar hierarchy has an incorrectly specified comment (description):

You must specify the correct level name: