0

i have an input parameter value "Europe - DMS Finland". but i need to input only finland to the mdx query to fetch the required data result.

i have tried this in where condition in mdx: where strtomember((right(@ManagementGroup,7))) but still the complete value is passing into the mdx. please advice.

Binny
  • 101
  • 1
  • 6
  • In your dataset how is your @ManagementGroup defined? Do you use visual MDX designer or you write your own query? If you use Visual designer you should go to the parameters tab and there generate the proper value of the parameters. You can use Cstr(@ManagementGroup.value) – Veselin Davidov Jan 04 '18 at 09:19
  • i'm using this in ssrs report designer. – Binny Jan 04 '18 at 09:51
  • Also my problem here is "Europe - DMS Finland" this name is dynamic and i need only the name after the DMS to provide input to the dataset. – Binny Jan 04 '18 at 09:53
  • 1
    there is regex function match() that can help you get the country only – Veselin Davidov Jan 04 '18 at 15:09

1 Answers1

0

If you want to use strToMember then you'll need to provide the full member name, including the dimension name and hierarchy name - so something like the following:

STRTOMEMBER(
   '[Geography Dimension].[Country].[Country].&[' + right(@ManagementGroup,7) + ']'
)
whytheq
  • 34,466
  • 65
  • 172
  • 267