COGNOiSe.com - The IBM Cognos Community

IBM Cognos Analytics Platform => Cognos Analytics => Reporting => Topic started by: oscarca on 16 Aug 2018 03:07:40 AM

Title: The MDX function CURRENTMEMBER failed because the attribute contains a set.
Post by: oscarca on 16 Aug 2018 03:07:40 AM
Hey Cognos,

Anyone familiar with how to solve this error?
"The MDX function CURRENTMEMBER failed because the coordinate for the 'ItemTypeLevel1IDName' attribute contains a set.
RSV-SRV-0042 Trace back:
"
I Have localized the issue to this data item:
tuple([Actual];[Quantity Net Weight];[7 Invoiced])/tuple([Actual];[Quantity Net Weight];[7 Invoiced];[Summary(Item Type)])

and it seems like its complaining about [Summary(Item Type)] which looks like this:
member(aggregate(currentMeasure within set [Item Type]);'itemType';'itemType';[CBI Sales].[Item].[Item Type])

I assume here that the reason for the error is that the data item Summary(Item Type)] generates a set which is later used here:
tuple([Actual];[Quantity Net Weight];[7 Invoiced])/tuple([Actual];[Quantity Net Weight];[7 Invoiced];[Summary(Item Type)])


[Item Type] data item looks like this:
[CBI Sales].[Item].[Item Type].[Item Type Level 2]

So the real question would then be how to rewrite the code.
Thank you Cognos Community for always being great help.
Title: Re: The MDX function CURRENTMEMBER failed because the attribute contains a set.
Post by: oscarca on 16 Aug 2018 04:33:32 AM
*Solved it*

By changing: member(aggregate(currentMeasure within set [Item Type]);'itemType';'itemType';[CBI Sales].[Item].[Item Type])
to member(total(currentMeasure within set [Item Type]);'itemType';'itemType';[CBI Sales].[Item].[Item Type]).

Seems like it generated a set even though I declared it as a member when I used aggregate...