A member can only ever return a single row. To return multiple rows what you need is a named set.
eg
CREATE SET CURRENTCUBE.[Customer].[Customers with Value > 1000] AS ...
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Hi,
im trying to get something to work and maybe (hopefully) it needs just some tweaking.
I need to add something to my multidimension cube.
I have the following measure that is working as intended, it COUNTS the customers having a certain measure >= X in this case 1000:
CREATE MEMBER CURRENTCUBE.[Measures].[Count customers with Value > 1000] AS
AS count(
filter(
[Customer].[Customer ID].[Customer ID].members,
Aggregate([Datatype].[Datatype].&[Act],[Measures].[Value]) >= 1000
)
),
VISIBLE = 1;
Now INSTEAD of the number of customers i need the customer ids themselves. By adding an element to a dimension.
This is the idea behind what im trying to do.
It works, it a simply links ONE example customer to this attribut.
CREATE MEMBER CURRENTCUBE.[Customer].[Customer ID].[Custom Value > 1000] AS
[Customer].[Customer ID].&[00000000],
VISIBLE = 1;
What i need is to use the logic of the measure that is counting the customers with a value higher than X, but instead just returns the customers themselves without the count. I tried the following versions but could not get it to work.
Its bascically using the "one Example" version with the reduced logic of "count" measure.
But it does not work.
CREATE MEMBER CURRENTCUBE.[Customer].[Customer ID].[Customers with Value > 1000] AS
filter(
[Customer].[Customer ID].[Customer ID].members,
Aggregate([Datatype].[Datatype].&[Act],[Measures].[Value]) >= 1000
),
VISIBLE = 1;
CREATE MEMBER CURRENTCUBE.[Customer].[Customer ID].[Customers with Value > 1000] AS
filter(
[Customer].[Customer ID].[Customer ID],
Aggregate([Datatype].[Datatype].&[Act],[Measures].[Value]) >= 1000
),
VISIBLE = 1;
Maybe anyone knows what my mistake is in the 2 attempts i made.
I hope/assume its just some small adjustment to actually make it work since the measure already does what its intended to do.
A member can only ever return a single row. To return multiple rows what you need is a named set.
eg
CREATE SET CURRENTCUBE.[Customer].[Customers with Value > 1000] AS ...
Hi @Tobias Strobel ,
Welcome to Microsoft Q&A!
Please try below script:
CREATE MEMBER CURRENTCUBE.[Measures].[Count customers with Value > 1000] AS
IIF(
( [Customer].[Customer ID].currentmember,
Aggregate([Datatype].[Datatype].&[Act],[Measures].[Value])) >= 1000
, 1,null
),
VISIBLE = 1;
Best regards,
Carrin
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.