On Dec 11, 7:35 pm, "balajikkrishnan via SQLMonster.com"
wrote:
> Hi All,
>
> How do I create a calculated measure to display a measure between two
> different date ranges
>
> Then the query looks like [tsub_dt > 15/10/2008’ and tsub_dt < 05/12/2008]
>
> Thanks
> Balaji
>
> --
> Message posted via SQLMonster.comhttp://www.sqlmonster.com/Uwe/Forums.aspx/sql-server-olap/200812/1
Try this MDX in AdventureWorks
This will check if year between 2003 to 2004 it will show inside else
it will show outside.
with member [Measures].[test]
as
iif(isempty((exists ([Date].[Fiscal].currentmember,{[Date].[Fiscal].
[Fiscal Year].&[2003]:[Date].[Fiscal].[Fiscal Year].&[2004]}).item(0),
[Measures].[Internet Sales Amount])),"Outside","inside")
select {[Measures].[Internet Sales Amount], [Measures].[test]} on 0 ,
[Date].[Fiscal].[Fiscal Year] on 1
from
[Adventure Works]
Thanks and Regards
Amish shah
http://shahamishm.blogspot.com >> Stay informed about: Caculated Measure - Date Filter - Range