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
MattAdams
Helper I
Helper I

Power Query Join

I have table NOWODS_O_NOW_TASK_TASK, which contains a hash value on column a, where the readable value is in table NOWODS_O_NOW_SYGP_USER_GROUP on column b, . I have a straight join (1 to 1) and would like that in my power query for the NOWODS_O_NOW_TASK_TASK query to have column b show up next to column a in my query so I can use its group name value rather than the hash value. Below is my Advanced Editor for this query existing. How do I get this column B into my query below with the existing relationship? This is probably very beginner type of things, but I am new to some functionality within Power Bi.

 

let
Source = Sql.Database("dbserver", "db"),
NOWODS_O_NOW_TASK_TASK = Source{[Schema="SchemaName",Item="O_NOW_TASK_TASK"]}[Data],
#"Filtered Rows" = Table.SelectRows(NOWODS_O_NOW_TASK_TASK, each Text.StartsWith([NOW_TASK_B_TASK_NBR], "SER") or Text.StartsWith([NOW_TASK_B_TASK_NBR], "RTASK"))
in
#"Filtered Rows"

1 ACCEPTED SOLUTION
v-ljerr-msft
Employee
Employee

Hi @MattAdams,

 

Is there any reason that you have to add the column with Power Query? If using DAX is also ok, you should be able to simply use the formula below to add a new calculate column in table NOWODS_O_NOW_TASK_TASK under Modeling tab. Smiley Happy

column b = RELATED ( NOWODS_O_NOW_SYGP_USER_GROUP[column b] )

c0.PNG

 

Regards

View solution in original post

4 REPLIES 4
v-ljerr-msft
Employee
Employee

Hi @MattAdams,

 

Is there any reason that you have to add the column with Power Query? If using DAX is also ok, you should be able to simply use the formula below to add a new calculate column in table NOWODS_O_NOW_TASK_TASK under Modeling tab. Smiley Happy

column b = RELATED ( NOWODS_O_NOW_SYGP_USER_GROUP[column b] )

c0.PNG

 

Regards

@v-ljerr-msft you solved it with DAX, but I find using power query is easier for me to manipulate columns. After adding the column in DAX, I can't go into Edit Queries and reference that column. I would like to go into Edit Queries and that column from NOWODS_O_NOW_SYGP_USER_GROUP table be alongside NOWODS_O_NOW_TASK_TASK. How can I do this? Your help is immensely appreciated.

I was able to do this successfully by the following the blog post below. Very helpful.

http://radacad.com/how-to-change-joining-types-in-power-bi-and-power-query 

I will try it! No, no power query requirement. Thanks! Will report back.

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.