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

Help with custom MDX query in Report Builder

$
0
0

Im trying to create a simple report that will display sales for the previous day in one column and YTD sales in the other column.  Seems like a very simple concept.  Yesterday the report worked great and was giving me the numbers for both columns, today though I am only getting the YTD number and nothing for yesterdays sales when I run the report in Report Builder. Any help would be greatly appreciated.

Here is the MDX query I have writen in my dataset:

="with member [Measures].[YTD] as ([Time Variants].[Time Variants].&[8], [Measures].[Units])
 member [Measures].[Yesterday] as ([Measures].[Units], [Date].[Day].currentmember.lag(1))

 select { [Measures].[YTD] ,[Measures].[Yesterday], [Measures].[Units]} ON COLUMNS
 from [SalesProfit]
 where " + Parameters!TodayMember.Value

The TodayMember parameter looks like this:

="[Date].[Year-Mon-Day].&[" + CStr(Format(Parameters!Today.Value, "yyyyMMdd")) + "]"


Viewing all articles
Browse latest Browse all 14337

Trending Articles



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