Does anyone have any experience writing CUBE* functions in Excel?
I'm writing these functions against an OLAP db
and firing MDX
strings at the db, via these functions.
Seems that in certain circumstances if one of the functions fails and returns #NA, then they all fail.
Are there specific MDX
functions that should not be used within these Excel
functions?
Here are some examples:
1. MDX string:
PARALLELPERIOD([Date].[Date - Calendar Month].[Calendar Year],1,TAIL([Date].[Date - Calendar Month].[Calendar Day].MEMBERS,1).item(0))
Cube function:
=CUBESET("connectionToCube","PARALLELPERIOD([Date].[Date - Calendar Month].[Calendar Year],1,TAIL([Date].[Date - Calendar Month].[Calendar Day].MEMBERS,1).item(0))")
2. MDX string:
TAIL([Date].[Date - Calendar Month].[Calendar Day].MEMBERS,1).item(0)
Cube function:
=CUBEMEMBER("connectionToCube","TAIL([Date].[Date - Calendar Month].[Calendar Day].MEMBERS,1).item(0)")
EDIT
This workbook also contains several pivot tables that contain custom sets. These sets are saved with the following settings:
Could this be causing some sort of conflict?
EDIT
Another slightly more complicated MDX string is what I'm using to capture the 7 day period prior to the last 7 days:
MDX:
Tail([Date].[Date - Calendar Month].[Calendar Day].MEMBERS,1).item(0).lag(7):Tail([Date].[Date - Calendar Month].[Calendar Day].MEMBERS,1).item(0).lag(13)
CUBE* FUNCTION:
=CUBESET("LiveDealer_LiveDealer2",("Tail([Date].[Date - Calendar Month].[Calendar Day].MEMBERS,1).item(0).lag(7):Tail([Date].[Date - Calendar Month].[Calendar Day].MEMBERS,1).item(0).lag(13)"))