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
JavidRob
Regular Visitor

lookup value (Help me)

Hi guys
I have two tables, in one of which I have a unique code and in the second table I have all the orders of that unique code on different dates. A DAX code with which I can create a column that shows the last customer date (FactorDate) in the first table from the second table. (Format date is a Text)Table 1     Unique CodeTable 1 Unique CodeTable 2     Unique Code    FactorDateTable 2 Unique Code FactorDate

1 ACCEPTED SOLUTION
FreemanZ
Super User
Super User

hi @JavidRob 

try to add a calculated column in Table1 like:

LastDate = 
MAXX(
    FILTER(
        Table2,
        Table2[Unique Code] =Table1[Unique Code]
    ),
    Table2[FactorDate]
)

 

View solution in original post

5 REPLIES 5
FreemanZ
Super User
Super User

hi @JavidRob 

try to add a calculated column in Table1 like:

LastDate = 
MAXX(
    FILTER(
        Table2,
        Table2[Unique Code] =Table1[Unique Code]
    ),
    Table2[FactorDate]
)

 

Thank you so much 😍

Unfortunately, the "FactorDate" column in my table2 has a text format, not a date, so I think the function "LastDate" doesn't work

hi @JavidRob 

then try like:

LastDate =
MAXX(
    FILTER(
        Table2,
        Table2[Unique Code] =Table1[Unique Code]
    ),
    DATEVALUE(Table2[FactorDate])
)

3.jpg

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.