microsoft / Analysis-Services

Git repo for Analysis Services samples and community projects
MIT License
607 stars 416 forks source link

BPA rule: Set IsAvailableInMDX to false error returned: no attribute hierarchy enabled #190

Closed martinerr closed 1 year ago

martinerr commented 1 year ago

When I set "Available in MDX" to False for some columns and try to save, I get the following error: "Failed to save modification to the server. Error returned: 'The column XXX does not have an attribute hierarchy enabled.'.

Could somebody help me with this? The BPA is suggesting these columns. For most columns it is possible to do but for some it is not and I cannot find any logic to that yet. Where can I see if a column does not have an attribute hierarchy enabled? And would it be possible to exclude these then also from the BPA rule? Thank you!

m-kovalsky commented 1 year ago

Did you experience this when saving back to Power BI Desktop, the Power BI Service, or Analysis Services? Which type of column caused this error?

You can see if a column has an attribute hierarchy enabled by selecting a column in Tabular Editor and viewing the 'Available in MDX' property. A value of 'True' means that the attribute hierarchy is enabled.

martinerr commented 1 year ago

I get the error when I save the tabular editor file. So a column first has the property 'Available in MDX' set to TRUE. I then try to set it to FALSE (since I don't need any columns available in MDX and the BPA rule suggests this column). But then when I save the tabular editor file it gives this error saying: 'The column does not have an attribute hierarchy enabled'.. So my suggestion for the BPA rules is to only show columns for which it is actually possible to change the setting to FALSE without giving an error.

m-kovalsky commented 1 year ago

Please identify which column caused this and identify the column properties.

martinerr commented 1 year ago

It's multiple columns but for example this first one: image The properties are: image

And then when I set "available in MDX" to 'False' and try to save it gives this error: image

Thanks a lot for your help!

m-kovalsky commented 1 year ago

Thanks for clarifying. Columns which themselves have a sort column must have an attribute hierarchy. In this case, the 'Options(legend)' column has a sort column (Source number). This has been resolved in version 1.2.4