Details
-
Type:
Bug
-
Status: Closed
-
Severity:
Urgent
-
Resolution: Cannot Reproduce
-
Affects Version/s: 3.4.1 GA (4.5.0 GA Suite Release)
-
Fix Version/s: None
-
Component/s: None
-
Labels:
-
Notice:
-
Sprint Team:Maintenance
Description
While using a MDX query with a DISTINCT inside a TOPCOUNT, which in turn is inside a named SET, produces wrong results. On the the other hand, if using the same TOPCOUNT directly in the SELECT, it presents the right results. This behaviour is only seen when using a Range or a set with more than one member in the WHERE clause.
Also important, if I remove the DISTINCT from the TOPCOUNT, the results are correct.
A simple example:
WITH
SET [Top Count] AS
{
TOPCOUNT(
DISTINCT([Customers].[Name].Members),
5,
[Measures].[Unit Sales]
)
}
SELECT
[Top Count] * [Measures].[Unit Sales] on 0
FROM [Sales]
WHERE [Time].[1997].[Q1].[1] : [Time].[1997].[Q3].[8]
This query should give the same results as the following one, which uses the TOPCOUNT directly in the SELECT clause:
SELECT
TOPCOUNT( DISTINCT( [Customers].[Name].Members), 5, [Measures].[Unit Sales]) * [Measures].[Unit Sales] on 0
FROM [Sales]
WHERE [Time].[1997].[Q1].[1]:[Time].[1997].[Q3].[8]
Also, if removing the DISTINCT from the TOPCOUNT in the first query, the results are correct.
This behaviour can be replicated using Mondrian master branch (3.4) together with the Foodmart cube which ships in Mondrain.
PractiTest Integration
Attachments
Issue Links
- is related to
-
MONDRIAN-1226 Set on slicer axis with different behaviour than aggregated member of same set in the slicer
-
- Closed
-
- relates to
-
MONDRIAN-1095 Tuple evaluation in calculated measures is wrong when using set with several tuples in WHERE clause
-
- Closed
-