Date in certain range indicator


hi all,

i've got date dimension ymd hierarchy want display on rows, , 3 measures want display on columns (see mdx below).

is possible add attribute on rows indicates whether or not [dim date].[date ymd].[year].[month].currentmember intersects set [monthsselection]?

with

set[monthscurrentyear] as[dim date].[date ymd].[year].&[2016].&[3].parent.children--comes from  parameter.

set[monthsselection] asintersect([dim date].[date ymd].[year].&[2016].&[3].lag(2) : [dim date].[date ymd].[year].&[2016].&[3].lag(-2)) --determine range.


select

{

[measures].[measure1],

[measures].[measure2],

[measures].[measure3]

}

oncolumns,

{

[monthscurrentyear]

}

onrows


from

mycube

thanks!

haven't understood requirement. looking :

with member measures.[monthsselection] count( 	intersect( 		[date].[calendar].currentmember, 		[date].[calendar].[month].&[2007]&[3].lag(2) :	[date].[calendar].[month].&[2007]&[3].lag(-2) 	) --determine range. )  select 	{ 		[measures].[internet sales amount], 		[monthsselection] 	} on columns, 	[date].[calendar].[month].&[2007]&[1]:[date].[calendar].[month].&[2007]&[12] 	on rows  [adventure works]


please specify sql server version while posting questions
please mark answer if solved issue
please vote helpful if helps solve issue



SQL Server  >  SQL Server Analysis Services



Comments

Popular posts from this blog

Conditional formatting a graph vertical axis in SSRS 2012 charts

Register with Power BI failed

SQL server replication error Cannot find the dbo or user defined function........