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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
campelliann
Post Patron
Post Patron

add columns / lookupvalue virtual Table

Hi, 

So I am trying to build a measure which returns the Last PRD Date.

The logic is this, I have a Table "RH projecto" on which I am going to add the Production date for each project "@Data_PRD". The PRD date is on Triskell completo Table, thus the need for the lookupvalue. 
Perhaps I am not building a row context or something like that?

Thanks!

Last PRD Date =
var current_project= SELECTEDVALUE(RH_projecto[ProjectID])
var tabela_virtual= ADDCOLUMNS(All(RH_projecto),"@Data_PRD", LOOKUPVALUE('Triskell Completo'[Produção],'Triskell Completo'[Processo],current_project))
return MAXX(tabela_virtual,[@Data_PRD])
1 ACCEPTED SOLUTION

Hi, first and foremost thank you! I have solved the problem with a calculated column. Using powerbi as excel never fails lol.

The issue seems to be related with the model and some circular dependencies since RH table is a summarized table, this is really a mess by now. Although your tip was good I also tried Calculate(first non blank) with a blank result... But is the syntax of my measure (just for the sake of understanding) correct? In a simpler model would work?

View solution in original post

3 REPLIES 3
tamerj1
Super User
Super User

Hi @campelliann 

can you please share screenshots of the visual. Initially let's say that LOOKUPVALUE returns blank incase it returned multiple rows. If this is your case then you need to summarize theTriskell Completo table to same granularity of the RH_projecto table perhaps using SUMMARIZE to aggregate MAX values of the Completo'[Produção]. If you can share information I might be able to help further. Thank you and have a great day. 

Hi, first and foremost thank you! I have solved the problem with a calculated column. Using powerbi as excel never fails lol.

The issue seems to be related with the model and some circular dependencies since RH table is a summarized table, this is really a mess by now. Although your tip was good I also tried Calculate(first non blank) with a blank result... But is the syntax of my measure (just for the sake of understanding) correct? In a simpler model would work?

Pleaseure to hear that. Yes indeed you need to have clean data and proper relationships before doing DAX. Keepup the good work. Good luck 👍 

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

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.