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

The Power BI Data Visualization World Championships is back! It's time to submit your entry. Live now!

Reply
Jen_41
Regular Visitor

Comparing two queries

Hi

I'm pretty new to this. I've searched through the forum and tried a few of the previously suggested solutions. Whenever I edit the solution to include my table and columns names I either end up with a Token Literal Expected error or a Token RightParen Error.

 

I have two queries, Current and Journals. I would like to check column Reference in the Current query against column Ref.1 in the Journals query and return a result from the Narration column in the Journals query if they match.

 

Jen_41_0-1653032758443.png

 

Jen_41_1-1653032785223.png

 

Jen_41_2-1653032823807.png

 

Thank you

 

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Jen_41 , You can try mergein power query.

 

You can create a column in DAX

 

column in table 1=

var  _cnt = maxx(filter(Table2, Table2[Reference] = table1[Reference]), Table2[Reference] )

return if(not(isblank(_cnt)) , true(), false())

 


Append : https://radacad.com/append-vs-merge-in-power-bi-and-power-query

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

3 REPLIES 3
Jen_41
Regular Visitor

Hi 

 

Thnak you for your response. I've tried the formula suggested but am getting the below error message?

 

Jen_41_0-1653265521490.png

 

Anonymous
Not applicable

HI @Jen_41,

They are DAX formulas and you can't use them in power query columns, please back to the data view and create a calculated column with these formulas.

Regards,

Xiaoxin Sheng

amitchandak
Super User
Super User

@Jen_41 , You can try mergein power query.

 

You can create a column in DAX

 

column in table 1=

var  _cnt = maxx(filter(Table2, Table2[Reference] = table1[Reference]), Table2[Reference] )

return if(not(isblank(_cnt)) , true(), false())

 


Append : https://radacad.com/append-vs-merge-in-power-bi-and-power-query

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.