This project has moved. For the latest updates, please go here.

HideMemberIf on multiple selected hierarchylevels makes VS hang


I have 2 tables with a very similar structure - both are ParentChild and are flattened out using DAX
the columns names are the same for both tables - e.g. H_L01, H_L02, etc.
for both tables I add an Hierarchy with those levels
when I select multiple hierarchy-levels and try to set HideMemberIf VS hangs and i have to kill it
after i killed the process the *.bim file does not work anymore and i have to delete the annotations made by BIDS Helper manually to make the model work again


dgosbell wrote Jan 16, 2013 at 10:39 PM

I'm not sure if we have one issue or two here.

So to handle them in reverse, can you expand on "the *.bim file does not work anymore" - do you get an error message? Does SSDT crash or hang? We have another report of an issue with the annotations which we believe we have traced to an issue with Microsoft's AMO code. As far as we can tell our annotations are valid according to the XMLA specification, but we are investigating ways to fix this. To date this issue only appears to manifest itself when opening a solution.

I think the "hanging" in SSDT might be a different issue. Is this issue reproducible? Does it hang if you try to set the HideMemberIf one level at a time?

furmangg wrote Jan 17, 2013 at 5:19 PM

Also, when you select multiple hierarchy levels, are you multi-selecting two hierarchy levels from the same hierarchy? Or are you trying to select levels from multiple tables at the same time?

What version of SSDT are you on? What about your workspace database server?

Sorry this caused problems. We'll try to repro this behavior after you get us more info.

Are either of these tables large? We're doing a ProcessFull on the tables where you set HideMemberIf. That's because there's a bug where simply doing ProcessRecalc doesn't properly make the HideMemberIf setting change take effect. ProcessFull does... could it be that it's just taking a long time to process?

gbrueckl wrote Jan 23, 2013 at 1:38 PM

ok, I did some further testing
it does not matter whether i select 1 or multiple hierarchy levels
when i select 1 level and set the HideMemberIf property and save the model, i cannot reopen it again

when i try to open it again i get the following error:

Error Message:

An error occurred while opening the model on the workspace database. Reason: ReadElementContentAs() methods cannot be called on an element that has child elements.

Call Stack:

at Microsoft.AnalysisServices.VSHost.VSHostManager.PrepareSandbox(Boolean newProject, Boolean& isRefreshNeeded, Boolean& isImpersonationChanged, Boolean& saveRequired, List`1& truncatedTables, Boolean isRealTimeMode, Int32 clientCompatibilityLevel)

at Microsoft.AnalysisServices.VSHost.Integration.EditorFactory.CreateEditorInstance(UInt32 grfCreateDoc, String pszMkDocument, String pszPhysicalView, IVsHierarchy pvHier, UInt32 itemid, IntPtr punkDocDataExisting, IntPtr& ppunkDocView, IntPtr& ppunkDocData, String& pbstrEditorCaption, Guid& pguidCmdUI, Int32& pgrfCDW)

the issue is probably related to the fact that i am using build 11.0.9000.5 which is the CTP for DAXMD which may has slightly a different XML-structure?

VS actually always hangs (it does not crash) when i set HideMemberIf, regardless of the number of levels i select (1 or more)
but i guess this may also be related to the build i am using

by the way: selecting levels from different hierarchies should ideally also work

furmangg wrote Jan 23, 2013 at 4:54 PM

Luckily this is a known issue that I coded a workaround for over the weekend. Read more about it here:

I'll contact you through Codeplex and get you a private beta build of this workaround.

wrote Feb 22, 2013 at 1:40 AM

furmangg wrote Feb 27, 2013 at 11:21 PM

Just to close the loop on this issue, I think the last we discussed, it appears this is something you should report to Microsoft to see if they can fix this on the server. At a minimum, I'd encourage you to report on Connect so that they can consider this for vNext. If you need it fixed as a hotfix, you can open a support case with Microsoft. I know you know this Gerhard, but I'm writing all this for the benefit of others if they run into this problem.

We also discussed how your hierarchy as an unnatural hierarchy. At this point we're not clear of that's a contributing factor.

select *
from $system.mdschema_hierarchies
where structure_type <> 'Natural'

HideMemberIf appears to work in the scenarios I've tested. You must have a more complex example in some way.