Quantcast
Channel: SQL Server Analysis Services forum
Viewing all articles
Browse latest Browse all 14337

MDX Date Dependent Formula

$
0
0

I need help writing a date dependent formula in MDX.  I am not very experienced with proper syntax, and just try to mimic other working formulas by trial and error.

Basically, I want one formula if the date is between Nov 2017 and Apr 2019, otherwise use a different formula.  Below is what I tried, but I am not getting the desired results.

Case when ([Effective Date].[FY Date].[Month].CURRENTMEMBER.MEMBERVALUE >= [Effective Date].[FY Date].[Month]&[FY 2017-Nov] and[Effective Date].[FY Date].[Month].CURRENTMEMBER.MEMBERVALUE <= [Effective Date].[FY Date].[Month]&[FY 2019-Apr]) then

[Account].[Account].&[7147]-

[Account].[Account].&[4388]-

[Account].[Account].&[4387]-

[Account].[Account].&[4309]-

[Account].[Account].&[4312]+

[Account].[Account].&[5625]+

[Account].[Account].&[7408]

else

[Account].[Account].&[7147]-

[Account].[Account].&[4388]-

[Account].[Account].&[4387]-

[Account].[Account].&[4309]-

[Account].[Account].&[4312]


Viewing all articles
Browse latest Browse all 14337

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>