Scenario:
We have 2 date dimensions, the first, Date is a regular old Gregorian date dimension. The second, is a reporting date dimension and excludes Saturdays, Sundays, and Holidays. Our fact table has two date keys, one for the Gregorian, one for the reporting. Sales on Saturdays, Sundays, or Holidays roll to the next business day. In other words, any sales made on Saturday or Sunday show up on Monday.
We are creating a dashboard using PerformancePoint 2013. I want to have the dashboard automatically pick yesterday's reporting date. So on Monday, it would pick Friday. On a Holiday, it would pick the day before.
I've added an attribute to our Date dimension called Last business date which contains that date for every day of the dimension.
So this statement works:
SELECT STRTOMEMBER("[Date - Reporting].[Date].&[" +"20130625]")
ON 0
,[MEASURES].[Sales Amt] on 1
FROM [IBI_OLAP];
and this statement works:
SELECTexists([Date].[Last Business Date]
.children,STRTOMEMBER("[Date].[Date].&["
+ VBAMDX.Format(VBAMDX.Now()-1, "yyyyMMdd") +"]"))
ON 0
,[MEASURES].[Sales Amt] on 1
FROM [IBI_OLAP];
But, this statement does not work:
SELECT STRTOMEMBER("[Date - Reporting].[Date].&[" +
exists([Date].[Last Business Date]
.children,STRTOMEMBER("[Date].[Date].&["
+ VBAMDX.Format(VBAMDX.Now()-1, "yyyyMMdd") +"]"))
+ "]")
ON 0
,[MEASURES].[Sales Amt] on 1
FROM [IBI_OLAP];
Query (1, 20) The + function expects a tuple set expression for the 1 argument. A string or numeric expression was used.
Can anyone help, please? Thank you so much in advance.