Hi,
I'm currently experiencing an odd error in Mondrian (using the latest schema workbench (3.6.1)) when running the queries below. If I change the order of one of the dimensions I get missing results in the second query when I would expect them to be same as the only difference is the position of one of the dimensions.
In the first example we have:
Consumption Day, Consumption Hour, Consumption Method with two measures in the columns and a specifc chosen programme in the rows.
This produces this query with the following result:
Code:
SELECT
NON EMPTY Hierarchize(Union(CrossJoin([Consumption Date.Calendar].[Consumption Day].Members,
CrossJoin([Consumption Time.Time].[Consumption Hour].Members,
CrossJoin([Consumption Method].[Consumption Method].Members, {[Measures].[Total Viewing Time]}))),
CrossJoin([Consumption Date.Calendar].[Consumption Day].Members, CrossJoin([Consumption Time.Time].[Consumption Hour].Members,
CrossJoin([Consumption Method].[Consumption Method].Members, {[Measures].[Average Timeshift]}))))) ON COLUMNS,
NON EMPTY {Hierarchize({[Programme].[Programme 1]})} ON ROWS
FROM [Content - Programme]
Code:
Axis #0:
{}
Axis #1:
{[Consumption Date.Calendar].[2014-07-25], [Consumption Time.Time].[23:00], [Consumption Method].[PVR], [Measures].[Total Viewing Time]}
{[Consumption Date.Calendar].[2014-07-25], [Consumption Time.Time].[23:00], [Consumption Method].[PVR], [Measures].[Average Timeshift]}
{[Consumption Date.Calendar].[2014-07-26], [Consumption Time.Time].[00:00], [Consumption Method].[PVR], [Measures].[Total Viewing Time]}
{[Consumption Date.Calendar].[2014-07-26], [Consumption Time.Time].[00:00], [Consumption Method].[PVR], [Measures].[Average Timeshift]}
{[Consumption Date.Calendar].[2014-07-26], [Consumption Time.Time].[14:00], [Consumption Method].[PVR], [Measures].[Total Viewing Time]}
{[Consumption Date.Calendar].[2014-07-26], [Consumption Time.Time].[14:00], [Consumption Method].[PVR], [Measures].[Average Timeshift]}
{[Consumption Date.Calendar].[2014-07-27], [Consumption Time.Time].[15:00], [Consumption Method].[PVR], [Measures].[Total Viewing Time]}
{[Consumption Date.Calendar].[2014-07-27], [Consumption Time.Time].[15:00], [Consumption Method].[PVR], [Measures].[Average Timeshift]}
{[Consumption Date.Calendar].[2014-07-28], [Consumption Time.Time].[15:00], [Consumption Method].[PVR], [Measures].[Total Viewing Time]}
{[Consumption Date.Calendar].[2014-07-28], [Consumption Time.Time].[15:00], [Consumption Method].[PVR], [Measures].[Average Timeshift]}
{[Consumption Date.Calendar].[2014-07-28], [Consumption Time.Time].[16:00], [Consumption Method].[PVR], [Measures].[Total Viewing Time]}
{[Consumption Date.Calendar].[2014-07-28], [Consumption Time.Time].[16:00], [Consumption Method].[PVR], [Measures].[Average Timeshift]}
Axis #2:
{[Programme].[Programme 1]}
Row #0: 7,200
Row #0: 44
Row #0: 3,600
Row #0: 88
Row #0: 1,800
Row #0: 264
Row #0: 3,600
Row #0: 207
Row #0: 1,800
Row #0: 560
Row #0: 3,600
Row #0: 280
As you can see, with the dimensions in this order 12 result cells are returned. However, if the dimensions are rearranged to the following order, then a number of results are missing:
Consumption Day, Consumption Method, two measures and Consumption Hour in the columns and a specifc chosen programme in the rows.
This produces the following MDX query:
Code:
SELECT
NON EMPTY Hierarchize(Union(CrossJoin([Consumption Date.Calendar].[Consumption Day].Members,
CrossJoin([Consumption Method].[Consumption Method].Members,
CrossJoin({[Measures].[Total Viewing Time]}, [Consumption Time.Time].[Consumption Hour].Members))),
CrossJoin([Consumption Date.Calendar].[Consumption Day].Members, CrossJoin([Consumption Method].[Consumption Method].Members,
CrossJoin({[Measures].[Average Timeshift]}, [Consumption Time.Time].[Consumption Hour].Members))))) ON COLUMNS,
NON EMPTY {Hierarchize({[Programme].[Programme 1]})} ON ROWS
FROM [Content - Programme]
And only 6 result cells:
Code:
Axis #0:
{}
Axis #1:
{[Consumption Date.Calendar].[2014-07-25], [Consumption Method].[PVR], [Measures].[Total Viewing Time], [Consumption Time.Time].[23:00]}
{[Consumption Date.Calendar].[2014-07-25], [Consumption Method].[PVR], [Measures].[Average Timeshift], [Consumption Time.Time].[23:00]}
{[Consumption Date.Calendar].[2014-07-26], [Consumption Method].[PVR], [Measures].[Total Viewing Time], [Consumption Time.Time].[00:00]}
{[Consumption Date.Calendar].[2014-07-26], [Consumption Method].[PVR], [Measures].[Average Timeshift], [Consumption Time.Time].[00:00]}
{[Consumption Date.Calendar].[2014-07-28], [Consumption Method].[PVR], [Measures].[Total Viewing Time], [Consumption Time.Time].[16:00]}
{[Consumption Date.Calendar].[2014-07-28], [Consumption Method].[PVR], [Measures].[Average Timeshift], [Consumption Time.Time].[16:00]}
Axis #2:
{[Programme].[Programme 1]}
Row #0: 7,200
Row #0: 44
Row #0: 3,600
Row #0: 88
Row #0: 3,600
Row #0: 280
I would expect this to return the same amount of result cells in both cases.
I have a Mondrian schema and example dataset in postgresql that can be used to reproduce this error.
Should this be raised as a bug?