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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
mikeST
New Member

getting unexpected errors

a minute ago

Afternoon all, hope you can help out.  I am tring to compare two text fields in a column on two different tables and then return a text field value and write it in a column on the first table:  Example:

 

 

'Table 1'[system_id] =
IF (
DISTINCT('Table 1'[UIC]) = DISTINCT('Table 2'[UIC]),
DISTINCT('Table 2'[system_id]),
BLANK()
)

 

Error I keep getting is as follows:

mikeST_1-1740673893542.png

 

DAX:

EVALUATE

'Table 1'[system_id] =
IF (
DISTINCT('Table 1'[UIC]) = DISTINCT('Table 2'[UIC]),
DISTINCT('Table 2'[system_id]),
BLANK()
)

 

mikeST_0-1740674309692.png

 

mikeST_2-1740673893544.png

 


Correlation Id: e07dcf4e-1ad3-9181-2a01-5666123aa645
Error Details: The end of the input was reached.

 

Can someone provide guidance?

Message 1 of 0
 
0
Reply
 
 
 
 
 
  •  
1 REPLY 1
Greg_Deckler
Super User
Super User

@mikeST DISTINCT returns a table and you can't return a table as a column or measure result. I'm not sure but I *think* you want something like this:

New Column in Table1 = 
  VAR __ID = [SYSTEM_ID]
  VAR __UIC = [UIC]
  VAR __OtherUIC = MAXX( FILTER( 'Table2', [SYSTEM_ID] = __ID ), [UIC] )
  VAR __Result = IF( __UIC = __OtherUIC, __OtherUIC, BLANK() )
RETURN
  __Result


Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Power BI Cookbook Third Edition (Color)

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.