Search code examples
excelssasmdxtabularssas-tabular

Tabular Cube - Excel Filtering Doesn't Function At Node Level


I have the issue described in this post. I have two cubes with the same data backing them, one a Multi-Dimensional cube, the second a Tabular cube. If I connect to the cubes with excel and drag the top level of a hierarchy(in this example "Company" into my filter category in the Multi-Dimensional cube, then enter some text in the search bar in excel:

(Hierarchy - In Excel)

enter image description here

(Hierarchy - In Visual Studio)

enter image description here

(MultiDimensional - In Excel as a filter)

enter image description here

The level below will be filtered by the text and the results will be returned. However if I filter the same hierarchy in the tabular cube, the results are different:

(Tabular - In Excel as a filter)

enter image description here

I receive no results, the search doesn't appear to function correctly. I can get it to work if I'm looking at the leaf level of the hierarchy, but it appears as though the node level of the hierarchy search feature for tabular cubes in excel doesn't work.

Has anyone else experienced this issue before, I'd love to post the model of the cube but it's rather proprietary, I have experienced the same issue in multiple types of proprietary cubes on multiple servers and clients. Is this some sort of configuration in the model I can change? Or something in excel I can change?

Update 1

I've been doing a bit more digging, I setup SQL Profiler to run against my SSAS server while I performed the search, seems it's generating a MDX query(this time on my "item" hierarchy):

WITH MEMBER [Measures].cChildren As 'AddCalculatedMembers([Item].[I1 - Category].currentmember.children).count' 
Set FilteredMembers As 'Head (Filter(AddCalculatedMembers([Item].[I1 - Category].[Category].Members), InStr(1, [Item].[I1 - Category].currentmember.member_caption, "Per")>0),10001)' 
Select {[Measures].cChildren} on ROWS, 
Hierarchize(Generate(FilteredMembers, Ascendants([Item].[I1 - Category].currentmember))) DIMENSION PROPERTIES PARENT_UNIQUE_NAME, 
MEMBER_TYPE ON COLUMNS FROM [XXX_Test_TabularPro]

But it appears to be erroring out (would explain why I'm not getting any results in excel) when run against my cube:

Either you do not have permission to access the specified member, or the specified member does not exist.

It's a interesting error message, I've actually never seen it before, and there's not much on the internet about it, just a few dead ends. I'm quite sure I don't have a permission issue, I can reproduce the error by running the query as an admin on that server. I think it's related to something in the query or the format of the cube but I'm not quite sure which is the issue, and I'm not super familiar with MDX. Has anybody seen this before? Is there something I can change with the cube to not have this occur? Is it a syntax issue with the query, if so why would excel generate an invalid query?

Another interesting item of note, I noticed that the search function for a leaf level hierarchy works in excel(as noted above) so I swapped out "I1 - Item Category" for "IA - Item Name" and the query runs without issue (of course we're now searching the leaf level), it's something about running this query on a non-leaf level in this case "I1 - Item Category" that is causing this error to occur.

Update 2

Ok I've made a bit of a breakthrough, I've altered my query to see if any combination of input would allow it to work, and I've found one, if I change my filter from "Per" to "GL" I get a result, it turns out that the query outlined above is actually NOT returning results from "I1 - Item Category", it's actually returning results from "[Item].[IA - Item Name].Members" which contains a distinct list of item name's.

enter image description here

enter image description here

I can actually demonstrate this in excel as well:

enter image description here

This makes no sense what so ever, nowhere in my query shown above(the query generated from excels search) do I mention the item name, and you clearly see what "[Item].[I1 - Category].[Category].Members" should be returning in the screenshots above(and what is returned by the multidimensional cube), it just doesn't in tabular, worst of all I captured(with SQL profiler) the query from excel on searching the item hierarchy of both my identical tabular and multidimensional versions of my cube and they generate the same exact MDX query with the only difference being the name of the cube.

I'm forced to come to the conclusion that if one generates two identical cubes(identical as possible), one being tabular, the other multidimensional, and run the above query on them(assuming this hierarchy exists), they return different results, and tabular one will return incorrect results.

Has anyone seen this issue before? I feel the tabular cube is returning a incorrect record set for the specified MDX, how would this occur, is there anything I could do to modify the query or cube to resolve this issue?

Update 3

The saga continues, one of the core questions I'd like to answer here is: Is this something specific to the cubes I generate, or does it affect all cubes, I believe I have the answer to this...

Steps To Reproduce:

  1. Open Visual Studio, New Project, Select "Analysis Services Tabular Project", Next, Create, (A popup will display "Tabular Model Designer" I selected "Workspace Server" point it at my tabular cube server and set compatibility model 1200)

  2. Add the following data to a CSV file or by putting it in a SQL table:

enter image description here

Category_Description Sub Category_Description LeafName

Professional 10 Series Filter

Performance 10 TTR GL

Professional 10 Series Series 1

Unassigned Unassigned AUTOMOTIVE

Performance 500 S RACING

  1. Right click on "Data Sources" select "Import from Data Source", navigate through the menus to import the data source defined above.

  2. As part of item 3 you should've imported the table listed in step 2, you should see this in your tables the new table from your data source:

enter image description here

  1. Open your new table and create the following hierarchy:

enter image description here

  1. Right click on your "TabularProject" in VS, select "Analyze in Excel", this should bring up a excel window

  2. Pull the "Hierarchy1" hierarchy into "Filters", drop down this hierarchy in excel and attempt to search for "Per": You'll see that no results are displayed.

IMPORTANT Note: If I change the workspace to "Integrated", rebuild and process the cube, I no longer see the bug, it must be related to how the server is processing this model, in someway it must be different then how VS does it locally.


Solution

  • Ok, I think I finally understand what is occurring here, I checked my SSAS version number:

    15.0.32.55

    This is quite old, so I updated to "15.0.35.15" and it appears as though the issue is now resolved(search in excel now works), I believe this version upgrade introduced a fix that resolves this bug, most likely either this one, or this one.