sql server 2008 - MDX MAX MEMBER_KEY return wrong result -
i trying determine max dimension key processed cube can write view return new data process add operation.
i came across couple of links showing same thing. changed these examples bit , determined max date key within date dimension.
with member [measures].[maxkey] max([dim date].[date sk].allmembers ,strtovalue([dim date].[date sk].currentmember.member_key)) select {[measures].[maxkey]} on 0 [pgl dw] as expected results of above query 20170730
when change query execute against agent dimension returns incorrect value.
with member [measures].[maxkey] max([dim agent].[dim agent key].members , [dim agent].[dim agent key].currentmember.member_key) select {[measures].[maxkey]} on 0 [pgl dw] the value return above query "-6" incorrect.
if list dim agent member keys using below query values of 100000+
with member [measures].[dim agent key] [dim agent].[dim agent key].currentmember.member_key select {measures.[dim agent key]} on axis(0), [dim agent].[dim agent key].members on axis(1) [pgl dw] the dim agent key attribute dimension's key attribute it's keycolumn set dim agent.dim_agentkey (integer).
any idea why query returning incorrect results when querying agent dimension?
if find maximum of membervalue rather key still -6?
with member [measures].[maxkey] max([dim agent].[dim agent key].[dim agent key].members , [dim agent].[dim agent key].currentmember.membervalue) select {[measures].[maxkey]} on 0 [pgl dw];
Comments
Post a Comment