I'm trying to build a CubeFormula to pull a value directly from a DataModel I am starting to build.
If I make a pivot table, I see how it gets built, and I can create a CubeMember for each of the five items. But when I put it together, I can't seem to get a value.
These are the 5 separate CubeMember formula's.
=CUBEMEMBER("ThisWorkbookDataModel","[CompanyList].[Company Name].&[Company 1]")
=CUBEMEMBER("ThisWorkbookDataModel","[MonthlyData].[year].&[2020]")
=CUBEMEMBER("ThisWorkbookDataModel","[MonthlyData].[month].&[11]")
=CUBEMEMBER("ThisWorkbookDataModel","[MonthlyData].[description].&[Revenue]")
=CUBEMEMBER("ThisWorkbookDataModel","[Measures].[Sum of amt]")
I did notice that "Sum of amt" is not defined in the Data Model, but rather have an amt column. And I changing the Measure to [MonthlyData].[amt].[All] without any luck.
So my CubeValue formula currently looks like the below, but can't get a value.
=CUBEVALUE("ThisWorkbookDataModel","[CompanyList].[Company Name].&[Company 1],[MonthlyData].[description].&[Revenue],[MonthlyData].[year].&[2020],[MonthlyData].[month]].&[11],[Measures].[Sum of amt]")
Any thoughts where I'm going wrong?
EDIT. Trouble shooting piece by piece, I found a typo with an extra bracket in month ]]. Removing the extra bracket seems to have solved the problem.
Bookmarks