Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now

Reply
Anonymous
Not applicable

Cube.ApplyParameter exlude a single value

Hi.

 

I would like to exclude a sinlge value in my query.

 

I am connecting to SAP BW, and in the advanced editor, there is a line of code

"Cube.ApplyParameter"

I can only work out how to include several values, but my list is huge, and sometimes new values are added, so I would like to exclude a single value instead, but cannot work out how.

 

Can someone please help?

 

Here is how a single value is included, but how can i exclude that same value?

{Cube.ApplyParameter, "[!V000003]", {{"[ZMTPAYCO__ZMTPAYCAT].[LABO]"}}}

2 REPLIES 2
v-frfei-msft
Community Support
Community Support

Hi @Anonymous ,

 

Hope this case can help you.

https://social.msdn.microsoft.com/Forums/en-US/752a819f-2fd4-4555-95c6-2ea233e46214/cubemember-mdx-in-excel-how-to-exclude-just-one-piece-of-a-data-set?forum=sqlanalysisservices

 

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.
Anonymous
Not applicable

Hi @v-frfei-msft 

Thanks for your reply.

I am not sure if it is my synatx or this is not supported, but I get an error when I try a couple of different options.

Can you check if it is supported or it is my syntax?

 

When I try this:

{Cube.ApplyParameter, "[!V000001]", {{"Except([ZMTPAYCO].[NONB])"}}}

I get this error...


DataSource.Error: The SAP BW server reported an error: 'Invalid MDX command with [Except[ZMTPAYCO]'. To find more information about this error, visit the SAP support site and search for 'BRAINOLAPAPI 100'.
Additional information may be available in SAP Note '1084454, 1282785, 401607, 1786009'.
Details:
DataSourceKind=SapBusinessWarehouse
DataSourcePath=bipapp.energy.com.au/50/710
ID=BRAINOLAPAPI
NUMBER=100
MESSAGE_V1=[Except[ZMTPAYCO]
SYSTEM=BIP_710
Command=SELECT....

 

When I try this 

{Cube.ApplyParameter, "[!V000001]", "Except([ZMTPAYCO].[NONB])"}

I get this error...


Expression.Error: We cannot convert the value "Except([ZMTPAYCO].[N..." to type List.
Details:
Value=Except([ZMTPAYCO].[NONB])
Type=[Type]

Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

Find out what's new and trending in the Fabric Community.

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

Check out the November 2024 Power BI update to learn about new features.