Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
Hi,
I want to construct a hierarchy and have been told that I proabably only need two columns.
The columns I have is:
Stock Item Code (from 'Stock item master table'), and
Paren Stock Item (from 'Work order BOM' table).
As you see, the columns are from two different tables.
Can I construct a hierarchy anyway or?
I have read some posts on hierarchies in Power BI and found that many uses the 'PATH' function. When I try that function it tells me that I cannot use columns from two different tables.
Any ideas, trips or tricks on how I can get this started properly?
Many thanks!!
Hi @Anonymous
Hierarchies can't be created from columns in different tables. That's about it. You have to bring the columns into one table. There are many ways to do it. You can bring a column to one of the original tables or you can create a completely new table with just the columns you need and then join the table to others (for it to make sense, of course).
On the other hand, the PATH* functions are used if you have a parent-child hierarchy in a table. Since PBI does not handle this natively, you have to flattten the hierarchy. That's what the functions are for. But it does not look like you have a parent-child hierarchy.
Parent-child hierarchies: Parent-child hierarchies – DAX Patterns
Hierarchies: Hierarchies – DAX Patterns
Thanks for your reply, I'm quite new to Power BI. Ok, then it was as I suspected.
I think the easiest approach for me would be to create a completely new table with those two columns.
How do I do that?
Something tells me that I first need to go to 'Transform Data'?
Ok, what do you mean by flatten the hierarchy?
With kind regards.
Parent-child hierarchies: Parent-child hierarchies – DAX Patterns
Hierarchies: Hierarchies – DAX Patterns
User | Count |
---|---|
16 | |
15 | |
14 | |
12 | |
11 |
User | Count |
---|---|
19 | |
15 | |
14 | |
11 | |
9 |