0

I'm wondering what is AMP (&) sign in report parameters means? Is it required for the query? F.e.

[Life].[Year].&[2015]
alejandro zuleta
  • 13,962
  • 3
  • 28
  • 48
Vnuuk
  • 6,177
  • 12
  • 40
  • 53
  • Not getting your question! What you mean by "is it required for the query" ? which query? – Pedram Oct 27 '16 at 10:19
  • @pedram I mean AMP sign. I see in many example where people use it. Why? What this amp sign means in general in SSRS queries? – Vnuuk Oct 27 '16 at 10:28

2 Answers2

1

AMP (&) is used for string concatenation in SSRS - It's a operator.

& Generates a string concatenation of two expressions. Example:

=Fields!FirstName.Value & " " & Fields!LastName.Value

+ Adds two numbers. Also used to concatenate two strings. Example:

=Fields!FirstName.Value + " " + Fields!LastName.Value
Pedram
  • 6,256
  • 10
  • 65
  • 87
  • But what it means in this case > Select ( { STRTOSET('[Life].[Year].&[2015]', CONSTRAINED) }) – Vnuuk Oct 27 '16 at 10:50
0

It seems your datasource in an OLAP cube.

[Life] is your dimension
[Year] is the attribute
&[2015] is the value.

When you are reporting from a OLAP cube as datasource you have to create your datasets using MDX queries. & is used to refer to the value of a dimension attribute.

Suppose I have an OLAP cube with sales information, one of my dimension is Customer and it has an attibute called Gender. I should refer to my male clients in a MDX query as follows:

[Customer].[Gender].&[M]  --M for Male

In your case the parameter is set to [Life].[Year].&[2015] it means the year 2015 of the life dimension, so somewhere in your dataset query that parameter is filtering only the 2015 values. To answer your second question: yes, it is required since that is the MDX syntax.

I suggest you understand the basics about OLAP cubes and MDX, before trying to modify a SSRS report using those technologies.

ABOUT OLAP CUBES
MDX BASICS

For clarifying the pedram's answer the ampersand in your parameter expression is not concatenating anything in SSRS, it is just refering to an attribute value in your Life dimension.

Let me know if this helps.

alejandro zuleta
  • 13,962
  • 3
  • 28
  • 48