Click here to Skip to main content
15,893,161 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am very new to MDX and just started learning basics. In my project we are using MDX cube on OLAP.
We are facing some issue with duplicate records being fetched from the query. I tried to put distinct on rows but didn't work out.

Here is the original query.

C#
with member [Measures].[average_score] as [Measures].[Value]/[Measures].[Count],
FORMAT_STRING = '#,0.00' member [Measures].[label] as
[Standards].[Dim Standards Parent Id].Currentmember.Properties("Standard Type") + ' ' +
[Standards].[Dim Standards Parent Id].Currentmember.Properties("Standard Label")
select {[Measures].[label],[Measures].[average_score]} on columns,
NONEMPTY( (Descendants([Standards].[Dim Standards Parent Id],IIF(1 = 0,2,1+2))),
{[Measures].[average_score]}) on rows from surveys
where({[Questions].[Question Type].[RUBRIC_PLUS_EVIDENCE],
[Questions].[Question Type].&[RUBRIC],[Questions].[Question Type].&[SINGLE_SELECT]},
{[School Year].[Dim School Years Id].&[9]}, {[Questions].[Template Id].&[49]},{[Institutions].[Institution Id].[46760]},{[Surveys].[Survey Configuration Id].[118684]},{[Surveys].[Status].[IN_PROGRESS],[Surveys].[Status].[COMPLETED]})



can you please help me out in this.
Posted
Comments
Sergey Alexandrovich Kryukov 11-Sep-15 11:42am    
Just a question: why not preventing duplicate values in first place, where they are entered?
—SA
Member 11977352 11-Sep-15 12:04pm    
Hi,

That's a good point. I am working on that too. Our's is a big application and it will take some time figuring out that. So just trying to do a quick fix by eliminating the duplicate records.

Thanks

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900