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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
vidya9924
Frequent Visitor

unable to access a column from a data table due to many to many relationship

vidya9924_0-1708052251531.png

I am trying to acess the "Attending Worker" column from my wruser (2) table in my main table "btinvline" but im not able to do so because of the relationships I have established in between. The "aecactmem" ,"etact" , "etactline" & finally "etactcase" are all linked by the key kactid. The "etact" & "etactcase" tables have unique values but of different ranges. The "aecactmem" & "etactline" doesnt have unique values but again different ranges. so all have only some in common. 

 

vidya9924_1-1708052575912.png

My connection works & I'm able to visulaize things but I want to access that columns in my main table so that I can create more calculated columns based on linked tables. (for example: i want a new column called 

Worker =
IF (
ISBLANK([Attending Worker]),
IF (
[Status] = 'Late Cn; Billed As NoShow',
IFNULL([*Primary Worker], '')
),
[Attending Worker]
). im not able to achieve this because of the many to many relationship I suppose. Please help

2 REPLIES 2
amitchandak
Super User
Super User

@vidya9924 , Two access columns in table1 from table2, I can use the formula below, and add conditions as per need, you can use minx, maxx, countx ,sumx etc

 

New Column in Table 1=

Sumx(Filter(Table2, Table2[ID] = Table1[ID] && Table1[Date]>= Table2[Strat Date] && Table1[Date] <= Table2[End Date] ) , Table2[Value])

vidya9924_0-1708057672609.pngvidya9924_1-1708057697034.png

I have taken an example and shown. I want to access Attending Worker column from Table 6 in Table 1. When I try to get it using related function and its not happening because of the many to many relationship I have used. 

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

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.