public void AddUserHierarchy(Table daxTable, Tom.Hierarchy hierarchy) { Dax.Model.UserHierarchy daxUserHierarchy = new Dax.Model.UserHierarchy(daxTable) { HierarchyName = new Dax.Model.DaxName(hierarchy.Name), IsHidden = hierarchy.IsHidden, }; // Create the hierarchy from the top to the bottom level foreach (var level in hierarchy.Levels.OrderBy(t => t.Ordinal)) { Dax.Model.Column levelColumn = daxTable.Columns.Find(t => t.ColumnName.Name == level.Column.Name); daxUserHierarchy.Levels.Add(levelColumn); } daxTable.UserHierarchies.Add(daxUserHierarchy); }
private UserHierarchy GetDaxUserHierarchy(string tableName, string userHierarchyName) { var daxTable = GetDaxTable(tableName); var daxUserHierarchy = daxTable.UserHierarchies.Where(h => h.HierarchyName.Name == userHierarchyName).FirstOrDefault(); if (daxUserHierarchy == null) { daxUserHierarchy = new Dax.Model.UserHierarchy(daxTable) { HierarchyName = new Dax.Model.DaxName(userHierarchyName) }; } return(daxUserHierarchy); }
internal VpaUserHierarchy(Dax.Model.UserHierarchy userHierarchy) { this.UserHierarchy = userHierarchy; }
internal UserHierarchy(Dax.Model.UserHierarchy userHierarchy) { _UserHierarchy = userHierarchy; }