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

Get certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now

Reply
Bi-user
Regular Visitor

Hierarchy parent-child issue ( using only DAX )

hello everybody , I have these two tables in powerbi, my data arrangement is as showed in table 1 and in table 2 column ALL LEVELS exist , how can I add three columns to retrieve the values of each level in seperated column? I must do that with dax 
FBBF55CA-C8AF-47C2-B0B5-AB51945FB6DE.jpeg

I have tried so many different way but still it does not bring the values in this order! I need more fresh ideas thank you in advance ! 

1 ACCEPTED SOLUTION

@Bi-user 

I have edited Only Level 3 in the original reply. Not sure if this would generate circular dependency error. 

View solution in original post

5 REPLIES 5
sarath_chandra
Helper III
Helper III

@tamerj1 can you please help me out of this task please 

my input file look like

sarath_chandra_0-1691824745603.png

here is my requirement

sarath_chandra_1-1691824879418.png

please help me out 

tamerj1
Super User
Super User

Hi @Bi-user 

Top Level =
MAXX ( 

FILTER (

Table1,

Table1[Top Level] = "Yes" 

&& Table1[Level 1] = Table2[All Levels] 

),

Table1[Level 1]

)

 

Only Level 2 =
MAXX ( 

FILTER (

Table1,

Table1[Top Level] = "Yes" 

&& Table1[Level 1] = Table2[All Levels] 

),

Table1[Level 2]

)

 

Only Level 3 =
MAXX ( 

FILTER (

Table1,

Table1[Top Level] = "No" 

&& Table1[Level 1] = Table2[Only Level 2] 

),

Table1[Level 2]

)

Thank you !  For the top level we are good but in table 1 there are multiple values of NOTTopLevel items corrisponding to diverse level 2 values! So for onlylevel 1 in table 2 it brings just one value ! I may have better luck if I seperate those levels in Table 1 instead !

the problem is I can not manipulate the datamodel and relationship otherwise it would have been much easier! 

 

I'm trying to work on table one since those multiple values seem impossible to be retrieved ! I'll use the structure added one more condition to identify the level 1 which are parent to Level 2 . I'll let you know if it works , thank u 

@Bi-user 

I have edited Only Level 3 in the original reply. Not sure if this would generate circular dependency error. 

Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

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

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

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