Cube formulas: Filtering in CUBESET with multiple filters

%3CLINGO-SUB%20id%3D%22lingo-sub-2378826%22%20slang%3D%22en-US%22%3ECube%20formulas%3A%20Filtering%20in%20CUBESET%20with%20multiple%20filters%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2378826%22%20slang%3D%22en-US%22%3E%3CP%3EI%20am%20trying%20to%20generate%20a%20filtered%20list%20with%20CUBESET%20based%20on%20multiple%20filters%20on%20an%20Excel%20sheet%2C%20and%20I%20am%20getting%20nowhere%20even%20if%20Google%20is%20my%20friend.%3C%2FP%3E%3CP%3EI%20am%20working%20in%20Excel%202019%20on%20a%20local%20OLAP%20cube%20(Excel%20Data%20Model%2C%20tables%20are%20imported%20from%20other%20Excel%20tables%2C%20modifying%20the%20input%20is%20not%20an%20option)%3C%2FP%3E%3CP%3EThe%20task%20is%20to%20%22upgrade%22%20an%20existing%20report%20table%20with%20dynamic%20queries%20from%20the%20underlying%20cube.%20The%20user%20can%20define%20three%20inputs%3A%3C%2FP%3E%3COL%3E%3CLI%3ENumber%20of%20the%20article%20group%3C%2FLI%3E%3CLI%3EStart%20date%20of%20the%20query%3C%2FLI%3E%3CLI%3EEnd%20date%20of%20the%20query%3C%2FLI%3E%3C%2FOL%3E%3CP%3EIn%20the%20data%20model%20there%20are%20(in%20this%20example)%20three%20tables%3A%3C%2FP%3E%3COL%3E%3CLI%3EReturn%20table%3A%20List%20of%20all%20the%20article%20numbers%20which%20were%20returned%2C%20along%20with%20the%20date%20of%20return%3C%2FLI%3E%3CLI%3EArticle%20list%20lookup%20table%3A%20lists%20all%20the%20articles%20over%20all%20article%20groups%20and%20the%20corresponding%20group%20number%20for%20each%20article%3C%2FLI%3E%3CLI%3EDate%20lookup%3A%20a%20general%20date%20lookup%20table%3C%2FLI%3E%3C%2FOL%3E%3CP%3EThe%20lookup%20tables%20have%20a%20%221%20to%20many%22%20connection%20with%20the%20fact%20table%3C%2FP%3E%3CP%3EThe%20table%20that%20needs%20to%20be%20filled%2C%20is%20a%20top-10%20table%2C%20listing%20the%20articles%20with%20the%20most%20returns%20in%20the%20chosen%20group%2C%20between%20the%20start%20and%20end%20date.%20There%20is%20a%20measure%2C%20which%20gets%20the%20number%20of%20returns%20for%20each%20article.%20The%20first%20column%20is%20a%20sequence%20of%20numbers%20from%201%20to%2010.%20The%20second%20column%20should%20be%20a%20list%20of%20article%20numbers%20starting%20with%20the%20one%20with%20the%20most%20returns.%3C%2FP%3E%3CP%3EIt%20is%20clear%2C%20that%20I%20can%20get%20the%20Article%20numbers%20with%20CUBERANKEDMEMBER%20but%20for%20that%20I%20need%20a%20properly%20filtered%20CUBESET.%20And%20that's%20where%20the%20problems%20start.%3C%2FP%3E%3CP%3EI%20was%20able%20to%20generate%20a%20list%20of%20articles%20with%20CUBESET%3A%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-excel%22%3E%3CCODE%3E%3DCUBESET(%22ThisWorkbookDataModel%22%3B%20%0A%22%7B(%5BReturns%5D.%5BGroup%5D.%5BAll%5D.%5B%22%26amp%3BGroupNum%26amp%3B%22%5D%2C%0A%5BReturns%5D.Article%5D.children)%7D%22%3B%20%0A%22ArticleNr%22%3B%20%0A2%3B%20%0A%22%5BMeasures%5D.%5BNumber%20of%20Returns%5D%22)%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3Ewhere%20%22GroupNum%22%20is%20a%20named%20field%2C%20where%20the%20user%20can%20select%20the%20desired%20group%20from%20a%20list.%3C%2FP%3E%3CP%3EThis%20code%20generates%20a%20list%2C%20but%20it%20completely%20disregards%20the%20start%20and%20end%20dates%20and%20I%20wasn't%20able%20to%20insert%20that%20filter.%3C%2FP%3E%3CP%3EMy%20question%20is%20how%20can%20I%20create%20a%20properly%20filtered%20CUBESET.%20(Properly%20means%20filtered%20to%20article%20group%2C%20starting%20and%20ending%20date).%3C%2FP%3E%3CP%3EThank%20you%20for%20the%20help%20in%20advance.%3C%2FP%3E%3CP%3EPeter%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2378826%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EBI%20%26amp%3B%20Data%20Analysis%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EExcel%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EFormulas%20and%20Functions%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
Occasional Visitor

I am trying to generate a filtered list with CUBESET based on multiple filters on an Excel sheet, and I am getting nowhere even if Google is my friend.

I am working in Excel 2019 on a local OLAP cube (Excel Data Model, tables are imported from other Excel tables, modifying the input is not an option)

The task is to "upgrade" an existing report table with dynamic queries from the underlying cube. The user can define three inputs:

  1. Number of the article group
  2. Start date of the query
  3. End date of the query

In the data model there are (in this example) three tables:

  1. Return table: List of all the article numbers which were returned, along with the date of return
  2. Article list lookup table: lists all the articles over all article groups and the corresponding group number for each article
  3. Date lookup: a general date lookup table

The lookup tables have a "1 to many" connection with the fact table

The table that needs to be filled, is a top-10 table, listing the articles with the most returns in the chosen group, between the start and end date. There is a measure, which gets the number of returns for each article. The first column is a sequence of numbers from 1 to 10. The second column should be a list of article numbers starting with the one with the most returns.

It is clear, that I can get the Article numbers with CUBERANKEDMEMBER but for that I need a properly filtered CUBESET. And that's where the problems start.

I was able to generate a list of articles with CUBESET:

=CUBESET("ThisWorkbookDataModel"; 
"{([Returns].[Group].[All].["&GroupNum&"],
[Returns].Article].children)}"; 
"ArticleNr"; 
2; 
"[Measures].[Number of Returns]")

where "GroupNum" is a named field, where the user can select the desired group from a list.

This code generates a list, but it completely disregards the start and end dates and I wasn't able to insert that filter.

My question is how can I create a properly filtered CUBESET. (Properly means filtered to article group, starting and ending date).

Thank you for the help in advance.

Peter

 

0 Replies