I am writing a series of queries to my workbook's data model to retrieve the number of documents by Category_Name
which are greater than a certain numbers of days old (e.g. >=650
).
Currently this formula (entered in celll C3
) returns the correct number for a single Days Old
value (=3
).
=CUBEVALUE("ThisWorkbookDataModel",
"[Measures].[Count of Docs]",
"[EDD_Report].[Category_Name].&["&$B2&"]",
"[EDD_Report_10-01-18].[Days Old].[34]")
How do I return the number of documents for Days Old
values >=650
?
The worksheet looks like:
A B C
1 Date PL Count of Docs
2 10/1/2018 ALD 3
3 ...
UPDATE: As suggested in @ama 's answer below, the expression in step B did not work.
However, I created a subset of the Days Old
values using
=CUBESET("ThisWorkbookDataModel",
"{[EDD_Report_10-01-18].[Days Old].[all].[650]:[EDD_Report_10-01-18].[Days Old].[All].[3647]}")
The cell containing this cubeset is referenced as the third Member_expression
of the original CUBEVALUE formula. The limitation is now that the values for the beginning and end must be members of the Days Old
set.
This is limiting, in that, I was hoping for a more general test for >=650
and there is no way to guarantee that specific values of Days Old
will be in the query.