hierarchy
39 TopicsHow to create drill-down matrix hierarchy with pre-aggregated data without double-counting?
I have a pre-aggregated dataset from an agency where each hierarchy level has its own row with pre-calculated values: Category Total = 158,244 Sub-category = 45,000 Brand = 11,804 SKU = 350 The dataset also contains multiple periods (Q1, Q2, Q3, Q4, YTD, MAT) and regions β each combination of Product x Period x Region has its own row. Leaf nodes (SKU level) sum up correctly to parent values. What is the best approach to enable drill-down hierarchy in Power BI matrix with this data structure, without double-counting?Solved4KViews0likes6CommentsCreate Company/Project Hierarchy and show Projects at their respective level
Hello, I have 2 tables: Company table, where a Parent Company ID filed is pointing to a record in the same table. Project table where each Project is executed by a Company. I want to create a filter where I put the Companies and it shows by Hierarchy level, then under each Company there will be the Projects associated to it and the Companies under it if there's any. I tried iteration of PATH(), PATHLENGTH(), and PATHITEM() and got close results. Result needed in the filter: - Company X - Company A - Company D - Project Z - Company B - Project V - Project U - Company C - Company E - Project P Attaching some sample data. Companies CompanyID,CompanyName,ParentCompanyID 1,Global Holdings, 2,North America Division,1 3,Europe Division,1 4,Asia Division,1 5,US Subsidiary A,2 6,US Subsidiary B,2 7,Canada Subsidiary,2 8,EU Subsidiary A,3 9,EU Subsidiary B,3 10,Germany Ops,8 11,France Ops,8 12,Asia Subsidiary A,4 13,Asia Subsidiary B,4 14,Japan Ops,12 15,Korea Ops,12 16,Australia Region,4 17,Sydney Office,16 18,Melbourne Office,16 19,UK Ops,9 20,London Office,19 Projects ProjectID,ProjectName,CompanyID,ProjectStatus,StartDate,EndDate 1,Project Alpha,2,Active,2023-01-01,2023-06-30 2,Project Beta,2,Completed,2022-05-01,2022-10-31 3,Project Gamma,3,Active,2023-03-01,2023-09-30 4,Project Delta,3,On Hold,2023-02-01,2023-07-31 5,Project Epsilon,5,Completed,2021-07-15,2021-12-31 6,Project Zeta,6,Active,2023-01-15,2023-07-15 7,Project Eta,7,On Hold,2022-10-01,2023-04-30 8,Project Theta,8,Active,2023-04-01,2023-09-01 9,Project Iota,9,Completed,2022-01-01,2022-06-30 10,Project Kappa,10,Active,2023-02-01,2023-08-31 11,Project Lambda,11,On Hold,2022-08-01,2023-02-28 12,Project Mu,12,Active,2023-03-01,2023-08-31 13,Project Nu,13,Completed,2021-12-01,2022-05-31 14,Project Xi,14,On Hold,2023-06-01,2023-12-31 15,Project Omicron,15,Active,2023-04-01,2023-09-30 16,Project Pi,16,Completed,2022-02-01,2022-07-31 17,Project Rho,17,Active,2023-01-01,2023-06-30 18,Project Sigma,18,Completed,2022-09-01,2023-03-31 19,Project Tau,19,Active,2023-02-01,2023-07-31 20,Project Upsilon,20,On Hold,2023-01-15,2023-06-15 21,Project A1,5,Active,2023-03-01,2023-08-01 22,Project B1,6,Completed,2022-05-15,2022-11-30 23,Project C1,8,On Hold,2023-07-01,2023-12-01 24,Project D1,9,Active,2023-01-10,2023-07-10 25,Project E1,12,Completed,2021-10-01,2022-04-30 26,Project F1,13,Active,2023-04-10,2023-10-01 27,Project G1,14,Completed,2022-12-15,2023-05-30 28,Project H1,15,Active,2023-05-01,2023-11-01 29,Project I1,16,On Hold,2022-06-01,2022-12-15 30,Project J1,17,Completed,2022-03-01,2022-08-15 31,Project K1,19,Active,2023-04-01,2023-09-15 32,Project L1,20,On Hold,2023-05-15,2023-10-01 33,Project M1,5,On Hold,2023-01-01,2023-06-30 34,Project N1,6,Active,2023-04-01,2023-09-01 35,Project O1,9,Completed,2021-07-01,2022-01-31 36,Project P1,12,Active,2023-02-01,2023-08-31 37,Project Q1,13,On Hold,2022-11-01,2023-04-01 38,Project R1,14,Active,2023-01-01,2023-06-30 39,Project S1,16,Completed,2022-08-01,2023-01-15 40,Project T1,18,Active,2023-03-01,2023-08-31 41,Project U1,8,Completed,2022-04-01,2022-09-30 42,Project V1,10,Active,2023-05-01,2023-10-01 43,Project W1,11,On Hold,2023-02-01,2023-07-31 44,Project X1,19,Completed,2022-09-01,2023-03-31 45,Project Y1,17,Active,2023-01-10,2023-06-30 46,Project Z2,3,On Hold,2023-07-01,2023-12-01 47,Project Z3,2,Completed,2022-08-15,2023-01-15 48,Project Z4,6,Active,2023-02-01,2023-07-30 49,Project Z5,7,Completed,2022-10-15,2023-04-01 50,Project Z6,8,Active,2023-01-15,2023-06-15 Thanks in advance for the support.Solved1.8KViews3likes7CommentsBudget sum in a parent-child hierarchy matrix
Hello everyone, I am writing to you because I have a problem that I cannot solve. I have a table that contains a list of hierarchically linked projects (parent-child). The depth of the hierarchy is variable. Each project has a budget. The sum of the budgets of a project's direct children can be less than or equal to its budget. If possible, I would like to display the following in a matrix that allows me to browse the hierarchy (+/-) : - the budget for each project - the sum of its direct children (level n+1) - the sum of the leaves in the hierarchy Example of input table: Name of project ID Father id Budget A 1 100 000 B 2 1 50 000 C 3 1 40 000 D 4 2 20 000 E 5 2 30 000 F 6 3 30 000 Example of the expected result: Level 1 Level 2 (if displayed by user) Level 3 (if displayed by user) Project budget Sum of direct child project budgets Sum of the leaves A 100 000 90 000 80 000 B 50 000 50 000 50 000 D 20 000 0 0 E 30 000 0 0 C 40 000 30 000 30 000 F 30 000 0 0 I have tried a number of things, including following this video step by step https://www.youtube.com/watch?v=iwRqSl-_zvU, but I cannot achieve the expected result. Last but not least : I have PowerBI Destktop 2019 π Thank you very much for taking the time to read this and for responding if you have any ideas. ThomasSolved1.1KViews0likes6CommentsHierarchy in matrix visual: blank rows
Hi everyone! I have a hierarchical tree of departments and i would like the show the processes_id in each unit like that using the matrix visual. The strings in the format xxx-yyyy are the processes id that are in each unit. It's working amost well except the blanks rows π I would like to know if there is way not showing the blank rows. The option 'Show items with no data' is unchecked. In 'rows' i put the four levels and the process_id. The pbix file is here! Thanks for any help!Parent-Child Filtering In a Many-to-Many Model
I'm working on a dashboard reporting Absences organization wide. Below is a baseline data model based on our timekeeping software's data tier. In essence, we have a hierarchical org chart (OrgPath), with Employees mapped to one node at any time. Some employees are managers and are assigned AccessGroup containers which are mapped to 1+ OrgPaths. The intention of the dashboard is for RLS to filter the dashboard based on USERNAME() or another function to only display personnel in OrgPaths that are directly part of the manager's access group, AND for any child OrgPaths for those explicit parent OrgPaths. Building the PATH for the OrgPath is straightforward in DAX, but in RLS, I've tried using SELECTEDVALUE in this fashion but no luck OrgPaths[OrgPathID] IN PATH(SELECTEDVALUE(AccessGroupsOrgPathsMM(OrgPathID), OrgPaths[ParentOrgPathID]) What should be the DAX expression to filter the Absences table on Employees belonging to the 1+ OrgPaths part of the manager's selected AccessGroup? ERD below T-SQL DDL for the model is here. CREATE SCHEMA AbsenceDashboard GO CREATE TABLE AbsenceDashboard.OrgPaths ( OrgPathID int IDENTITY(1,1) NOT NULL PRIMARY KEY, OrgPath varchar(50), ParentOrgPathId int ) CREATE TABLE AbsenceDashboard.Employees ( EmployeeID int IDENTITY(1,1) NOT NULL PRIMARY KEY, EmployeeName varchar(50), OrgPathID int NOT NULL, ManagerID int ) GO ALTER TABLE AbsenceDashboard.Employees ADD CONSTRAINT FK_1 FOREIGN KEY(OrgPathID) REFERENCES AbsenceDashboard.OrgPaths(OrgPathID) GO CREATE TABLE AbsenceDashboard.AccessGroups ( AccessGroupID int IDENTITY(1,1) NOT NULL PRIMARY KEY, AccessGroup varchar(50) ) CREATE TABLE AbsenceDashboard.EmployeeAccessGroupsMM ( EmployeeID int NOT NULL, AccessGroupID int NOT NULL ) ALTER TABLE AbsenceDashboard.EmployeeAccessGroupsMM ADD CONSTRAINT FK_2 FOREIGN KEY(EmployeeID) REFERENCES AbsenceDashboard.Employees(EmployeeID) GO ALTER TABLE AbsenceDashboard.EmployeeAccessGroupsMM ADD CONSTRAINT FK_3 FOREIGN KEY(AccessGroupID) REFERENCES AbsenceDashboard.AccessGroups(AccessGroupID) GO CREATE TABLE AbsenceDashboard.AccessGroupsOrgPathsMM ( AccessGroupID int NOT NULL, OrgPathID int NOT NULL ) GO ALTER TABLE AbsenceDashboard.AccessGroupsOrgPathsMM ADD CONSTRAINT FK_4 FOREIGN KEY(OrgPathID) REFERENCES AbsenceDashboard.AbsenceDashboard(OrgPathID) GO ALTER TABLE AbsenceDashboard.AccessGroupsOrgPathsMM ADD CONSTRAINT FK_5 FOREIGN KEY(AccessGroupID) REFERENCES AbsenceDashboard.AccessGroups(AccessGroupID) GO CREATE TABLE AbsenceDashboard.Absences ( AbsenceID int NOT NULL PRIMARY KEY, EmployeeID int, DateAbsent date, DateReported datetime DEFAULT GETDATE() ) ALTER TABLE AbsenceDashboard.Absences ADD CONSTRAINT FK_6 FOREIGN KEY(EmployeeID) REFERENCES AbsenceDashboard.Employees(EmployeeID) GO741Views0likes4CommentsHelp with Formatting a Matrix with Multiple Hierarchical Levels in Power BI
Hello everyone, I am working on a Power BI report that uses a matrix with 10 hierarchical levels to display my financial data. My goal is to create a P&L (Profit and Loss) presentation where data at lower levels aggregates correctly to higher levels. However, I am facing a sorting issue: for example, I find the "Profit Before Tax" appearing at the top, while I would like to reorganize it so that it fits properly within the structure of my P&L (exemple here) Here are a few specific points where I would appreciate your help: Custom Sorting: How can I define a specific sort order for my hierarchical levels so that they display in the desired order? Data Aggregation: Is there a method to ensure that values aggregate correctly at each hierarchical level? Matrix Formatting: What are the best practices for formatting a matrix with so many levels to ensure optimal readability? Thank you in advance for your help and suggestions. Any advice or resources would be greatly appreciated! Best regards,Calculated measure as hierarchy
Hi, I have issue trying to have matrix to show calculated measure as row header/hierarchy. Any helps will be appreciated. Here is my test data and also separate standard calendar table that I dont add here Client Country Policy Inception Date Cancelation Date Claim No Claim Date ABC US P1 15/01/2024 C01 3/02/2024 ABC UK P2 17/01/2024 2/02/2024 ABC UK P3 20/02/2024 C03 5/05/2024 ABC UK P4 31/03/2024 C04 ABC UK P5 31/03/2024 C05 ABC US P6 10/03/2024 C06 ABC US P7 1/05/2024 C07 20/06/2024 ABC UK P8 2/05/2024 C08 ABC US P9 3/05/2024 C09 and here is my expected result Jan Feb Mar Apr May June Active Policy count 2 2 5 0 8 0 ABC 2 2 5 0 8 0 US 1 1 2 0 4 0 UK 1 1 3 0 4 0 Claims Count 0 1 0 0 1 1 ABC 0 1 0 0 1 1 US 0 1 0 0 0 1 UK 0 0 0 0 1 0 Thank you!Solved1.1KViews0likes2CommentsDate hierarchy
Hi, I have a general question about Dax in Excel. I have a fact table and in Power Queryand from this fact table I make a date table. I do this because I want to use the date table as a slicer. Then I push both table from Power Query to the Data model so that I can work with DAX. When I make a pivot table in Excel I am not seeing the date hierarchy (Year, Month, Day) that I would expect from the date table. However, this hierarchy is being created when I use the date column in my fact table. My question is, why is the hierarchy not being created when using the date table? Thanks, Naveen794Views0likes1CommentParent Child Hierarchy - Sum all Leafs on each NodeLevel
Hello everyone I hope you can help me with my Parent Child Hierarchy problem. I want to use a Dax measure to make the amount from the fact table (on hierarchy leaves) available on all node levels. The specialty is that I want to use the flat hierarchy column βNameβ from the table βHierarchyβ in the visual. Without the following solutions: Using a hierarchy Lev1-3 or LevName1-3 in scope of the visual Calculation as a column and not as a separate dax measure In the attached picture you can see the test data and the desired result.Solved1.1KViews0likes3CommentsPower BI Report Server - Hierarchy Axe Y impossible on bar graph
Hello everyone, Sorry for my approximate technical English, I hope the exposition of my problem will be understanding. Here is the version of : - my PowerBi Destock: Version: 2.109.1021.0 64-bit (September 2022) - my PowerBi Report Server: Version1.15.8377.1837(September 2022) I have a problem to go down in the data hierarchy on my Y axis in my PowerBi Report on a bar chart. On my PowerBi Destock : When setting up my bar chart, I defined a hierarchy for the Y axis based on a date table. On my chart, I can go down from month to week to day as set (on the top right corner). On my PowerBi Report : Once my PowerBi is online, when I open my PowerBi, I can't access the option to go down the bar chart (nothing on the top right corner). FYI, on a curved graph, I don't have this problem (with the same configuration). => Do you have any idea of the solution ? Thanks in advance for your help, Regards, Thomas β660Views1like1Comment