Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

V look up to build hierarchy

Hi all,

 

I have two tables.

 

One contains info about product class (production or purchased) and item groups. 

The other table contains all SKUs and corresponding item group.

 

I want to create the following hierarchy for my visuals:

 

Product class

Product group

SKU

 

How can I do this? Should I add a column to the table with product group and SKU info?

If so, how would I do this? I cannot do lookupvalue since not all values are numerical.

 

 

2 ACCEPTED SOLUTIONS
Anonymous
Not applicable

Hi @Anonymous,

 

Yes, all of your hierarchy columns must be in the same table.  The first thing to do is to create a relationship between the two tables if there is not one already.  After that, you can join the tables in power query editor, or you can use the RELATED DAX function.

View solution in original post

v-lid-msft
Community Support
Community Support

Hi @Anonymous ,

 

we can create a calculated column use following formula, the lookupvalue function does not need the column is numerical.

 

SKU =
LOOKUPVALUE ( 'SKUs Class'[SKU], 'SKUs Class'[item groups], [item groups] )

 

11.PNG12.PNG


If it doesn't meet your requirement, kindly share your sample data and expected result to me if you don't have any Confidential Information. Please upload your files to One Drive and share the link here.


BTW, pbix as attached.

 

Best regards,

Community Support Team _ Dong Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Community Support Team _ Dong Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
v-lid-msft
Community Support
Community Support

Hi @Anonymous ,

 

we can create a calculated column use following formula, the lookupvalue function does not need the column is numerical.

 

SKU =
LOOKUPVALUE ( 'SKUs Class'[SKU], 'SKUs Class'[item groups], [item groups] )

 

11.PNG12.PNG


If it doesn't meet your requirement, kindly share your sample data and expected result to me if you don't have any Confidential Information. Please upload your files to One Drive and share the link here.


BTW, pbix as attached.

 

Best regards,

Community Support Team _ Dong Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Community Support Team _ Dong Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

Hi @Anonymous,

 

Yes, all of your hierarchy columns must be in the same table.  The first thing to do is to create a relationship between the two tables if there is not one already.  After that, you can join the tables in power query editor, or you can use the RELATED DAX function.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.