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

Join the FabCon + SQLCon recap series. Up next: Power BI, Real-Time Intelligence, IQ and AI, and Data Factory take center stage. All sessions are available on-demand after the live show. Register 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
April Power BI Update Carousel

Power BI Monthly Update - April 2026

Check out the April 2026 Power BI update to learn about new features.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

FabCon and SQLCon Highlights Carousel

FabCon & SQLCon Highlights

Experience the highlights from FabCon & SQLCon, available live and on-demand starting April 14th.

Users online (1,148)