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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Anonymous
Not applicable

Lookupvalue ignoring null result and returning the not null result

Hi,

I have this Table1 with ID's and a "Status" column:
(Some ID's will repeat and I can't change this)

Table1

ID Status
568253 Programada
714417 Programada
714417  
349856 Já realizada
664270 Já realizada
595900 Programada
725439 Em férias
725439  
343945 Já realizada
343945  
324091 Programada
324091  
322606 Já realizada
612732 Programada
612732  
304312 Programada
304312  
304312  
356269  
356269 Programada
531853  
531853 Programada
621330 Já realizada
473833 Em férias
349112  
349112  
349112 Programada
23291 Programada
23291  
23291  
438195 Já realizada
438195  
625815 Já realizada
703150 Programada
703150  
351767 Programada
699483 Programada
699483  
425060  
425060 Programada
425060  
410946  
410946  
410946 Já realizada


Then I have this Table2 with a column "ID" with the unique values from "ID" from Table1 and some other unique IDs, I would like to get the not-null "Status" from Table1 and return a "Not found" for "ID" with only null values in column Status, creating a new column in Table2 using DAX:

Expected result:
Table2

ID NewColumn
568253 Programada
714417 Programada
349856 Já realizada
752420 NOT FOUND
766404 NOT FOUND
664270 Já realizada
746061 NOT FOUND
736935 NOT FOUND
595900 Programada
725439 Em férias
343945 Já realizada
324091 Programada
761841 NOT FOUND
762486 NOT FOUND
322606 Já realizada
612732 Programada
304312 Programada
356269 Programada
531853 Programada
621330 Já realizada
473833 Em férias
349112 Programada
23291 Programada
438195 Já realizada
625815 Já realizada
703150 Programada
351767 Programada
699483 Programada
425060 Programada
410946 Já realizada


Appreciate your help,

1 ACCEPTED SOLUTION

@Anonymous 

If you do so then you can simply do

New Column =
MAAX (

RELATEDTABLE ( tabl1 ),

table1[Satus] 

)

 

View solution in original post

3 REPLIES 3
tamerj1
Super User
Super User

Hi @Anonymous 

Why 425060 is not found? Same for 410846 and perhaps others. 
Also do tou have a relationship between the two tables?

Anonymous
Not applicable

Hi @tamerj1 , sorry, I have now adjusted my question table. 
I do not have any relationship set, but I could configure 
Many (table1) <---- to one (table2) by using the "ID" column on each other 

@Anonymous 

If you do so then you can simply do

New Column =
MAAX (

RELATEDTABLE ( tabl1 ),

table1[Satus] 

)

 

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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