Quantcast
Channel: SQL Server Analysis Services Forum
Viewing all articles
Browse latest Browse all 2472

MDX Calculation for Number of Days from Today until Qty

$
0
0

I am trying to calculate the number of days until a specific quantity is <0

I've been doing a little searching and I am pretty sure I need to use a combination of the HEAD function, FILTER function, and some way to get the DATEDIFF (invoke VBA).

I first need to find first day that is <0, and I am getting an error on this function:

HEAD(Filter([Time].[YQP].[Day Name].Members,Measures.[Contract Rem]<0),1)

The error I get is "Function Expects a String or Numeric Expression, a tuple set was used."

I'm by far an expert on MDX calculations, and struggle with complicated syntax.  I'm pretty sure what I want to do is possible, I just can't figure it out and would appreciate some assistance.


Jamie


Viewing all articles
Browse latest Browse all 2472

Trending Articles



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