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
alexgoh
New Member

DAX Help - Look up latest value from another tables

Hi All, 

I have two problem and would like to seek for expert help on what dax should I used:

 

  1. when I try to look up the latest value from one tables to anothers. Illustration as below: 
    alexgoh_0-1696501362084.png
    I have two tables, Table A store all the ID (which is unique field) and Table B store all the comment/value with ID and date.
    I wanted to lookup / link the value to show only latest comment. Have tried to use lookup dax but it got error whereby multiple value returned ? 

    Question: Any dax i can use to achieve above ? 

  2. I have a chart on to show the count of item in my dataset by date. 
    However, I would like to show in %, please refer to pic 2. 

    Picture 1 
    alexgoh_1-1696501635116.png


    Picture 2 
    However, the % of grant total seem off. What I want to achive is % / Total by each date.
    Each date, the % should be 100%. 

    alexgoh_3-1696501786570.png


    Question: Any dax/chart I can use to achive to show the % over each date ? 

 

 

 

 

 

2 REPLIES 2
tamerj1
Super User
Super User

Hi @alexgoh 
To get the latest comment you may try (calculated column in TableA)

Latest Comment =
MAXX (
    TOPN ( 1, FILTER ( TableB, TableB[ID] = TableA[ID] ), TableB[Date] ),
    TableB[Comment]
)

 To get the correct % try using CALCULATE - ALL ( 'Tab;e'[Mutual Consensus] ) at the denominator

Dangar332
Super User
Super User

Hi, @alexgoh  

Try with treats function

 

Create measure

Comment= calculate ('tableb'[comment], treats ('tablea'[Id], 'tableb'[I'd]

 

 

 

 

If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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