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
pkoel-asb
Helper V
Helper V

Filter Question - New User

Hello,

 

  I am using the Power BI desktop, and I am trying to transform a tabel. When I look at the query in the advanced editor, I see the following:

 

#"Sorted Rows" = Table.Sort(#"Added Custom",{{"TimeStamp", Order.Descending}}),
#"Filtered Rows3" = Table.SelectRows(#"Sorted Rows", each [objectid] = 203 or [objectid] = 209 or [objectid] = 228 or [objectid] = 248 or [objectid] = 255 or [objectid] = 267 or [objectid] = 273 or [objectid] = 277 or [objectid] = 286 or [objectid] = 293)

 

I want to change the #"Filtered Rows3" line so that it compares the [objectid] to a column of values in a different table named 'Moodle URL IDs to track'[Moodle URL Object ID]. How do I accomplish this?

 

Cheers,

 

Peter

1 ACCEPTED SOLUTION

You're mixing up DAX and M code in that snippet.

 

I'm going to stick with my original advice.  Have you tried it?

View solution in original post

3 REPLIES 3
HotChilli
Super User
Super User

In Power Query, you can do this with a 'Merge Queries' . If you choose one of the Anti-join types in the 'Join Kind' dropdown - there's an explanation next to each one.

Let me know how you get on.

Hello,

 

   Thank you for the reply. I have been doing some additional research and am trying this:

 

#"Sorted Rows" = Table.Sort(#"Added Custom",{{"TimeStamp", Order.Descending}}),
#"Filtered Rows3" = Table.SelectRows(#"Sorted Rows", filter(Moodle_log_table, Moodle_log_table[objectid]=related(MoodleURLIDstoTrack[objectid])))

 

However I keep getting a circular reference error.

 

Cheers,

 

Peter

 

 

You're mixing up DAX and M code in that snippet.

 

I'm going to stick with my original advice.  Have you tried it?

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.