Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Rule Submit] Disable Attribute Hierarchies rule should not apply to columns referenced by PATH function #44

Open
alwortman opened this issue May 7, 2021 · 0 comments

Comments

@alwortman
Copy link

Some DAX functions require the IsAvailableInMDX property to be true, though documentation as to which functions require it is poor.

In order for the function PATH to work, both the parent and child column it references must have this property set to true. I've added one additional filter to the expression to exempt such columns from being flagged.

Relevant rule addition:
and not ReferencedBy.AllColumns.Any(Expression.Contains(\"PATH(\"))

Full rule definition:

  {
    "ID": "DISABLE_ATTRIBUTE_HIERACHIES",
    "Name": "Disable attribute hierachies to decrease processing",
    "Category": "Metadata",
    "Description": "Disable Attribute hierarchies for hidden collumns. This will ensure faster processing. Exclude columns used in PATH function.",
    "Severity": 2,
    "Scope": "DataColumn",
    "Expression": "not IsVisible\r\nand IsAvailableInMDX\r\nand not UsedInHierarchies.Any()\r\nand not UsedInVariations.Any()\r\nand not UsedInSortBy.Any()\r\nand not ReferencedBy.AllColumns.Any(Expression.Contains(\"PATH(\"))",
    "FixExpression": "IsAvailableInMDX = false",
    "CompatibilityLevel": 1400,
    "Source":  "standard\\Metadata"
  }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant