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
suvechha
Helper IV
Helper IV

Inactive Relationship to get the field Technician ?

Hi there,

How to get the field "Technician" in my power bi report by using the inactive joining between "SDUser" and "AaaUser" as they are already join by 

 "SDUser" "sdu"
LEFT JOIN "AaaUser" "aau" ON "sdu"."USERID"="aau"."USER_ID" .

 

How to create an inactive relationship like below in the same model with the same table 

 

LEFT JOIN "SDUser" "td" ON "wos"."OWNERID"="td"."USERID"
LEFT JOIN "AaaUser" "ti" ON "td"."USERID"="ti"."USER_ID"


Attaching the sql code attaching as with image ?
And sample model attached.

suvechha_0-1597817277289.png

 

Data Model screenshot added.
suvechha_1-1597817362551.png

 


Thanks
Suvechha
 
1 ACCEPTED SOLUTION

Hi @suvechha ,

 

Or like this?
please refer to my .pbix file.

v-lionel-msft_0-1598341381370.png

v-lionel-msft_1-1598341451536.png

 

Best regards,
Lionel Chen

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

7 REPLIES 7
v-lionel-msft
Community Support
Community Support

Hi @suvechha ,

 

Like this?

v-lionel-msft_0-1597909181747.png

v-lionel-msft_0-1597909241569.png

 

Best regards,
Lionel Chen

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi ,

I used this measure to get the SDUserID

 

SDUserId = CALCULATE(

MAXX(SDUser,SDUser[USERID]),

USERELATIONSHIP(WorkOrderStates[OWNERID], SDUser[USERID])

)

 

which is represent in my sql query below:

LEFT JOIN "SDUser" "td" ON "wos"."OWNERID"="td"."USERID"

 

How to represent this below relationship (below)? 

LEFT JOIN "AaaUser" "ti" ON "td"."USERID"="ti"."USER_ID"

 

and get the result : "ti".FIRST_NAME as "Technician"

 

Thanks,

 

 

Hi @suvechha ,

 

Or like this?
please refer to my .pbix file.

v-lionel-msft_0-1598341381370.png

v-lionel-msft_1-1598341451536.png

 

Best regards,
Lionel Chen

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

amitchandak
Super User
Super User

@suvechha ,The information you have provided is not making the problem clear to me. Can you please explain with an example.
Refer this fro use relation

https://radacad.com/userelationship-or-role-playing-dimension-dealing-with-inactive-relationships-in...
Appreciate your Kudos.

Question edited. Tried to explain in details.

Arul
Super User
Super User

Hi @suvechha ,

Can you please elaborate your question more clear? So that I can help you swiftly.

 

Thanks,

-Arul





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!


LinkedIn


pranit828
Community Champion
Community Champion

Hi @suvechha 

 

The problem statement is not very clear.

 

This issue might be related to all inner joins you have on all the columns and the technician column is coming from last left join table.

Unless all the joins produce a non null record, technician is going to be NULL.





PBI_SuperUser_Rank@1x.png


Hope it resolves your issue? 
Did I answer your question? Mark my post as a solution!

Appreciate your Kudos, Press the thumbs up button!!
Linkedin Profile

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.