astrid 69000 (3/15/2013)
hi,i have another question (or two) 🙂
1) i want the mdx to always return the data from yesterday without choosing the data, can someone please tell me how to do it? everything i tried doesnt work 🙁
2) also the mdx returns the measures for the data i asked on the first column, how do i go iif i want different dates on different columns to return the data
You can use the VBA function Now() to calculate yesterday like:
WITH MEMBER [Measures].[Yesterday] AS
""+ FORMAT(Now()-1,"MM/dd/yyyy") +""
SELECT {[Measures].[Yesterday]} ON COLUMNS
FROM [AdventureWorks];
I'm not sure what your second question is asking.
HTH,
Rob