Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.
Hi ,
I am new to Power BI and need help in developing a DAX formula to generate a report.
I have 2 tables.
Table 1 :
Table 2 :
Req ID is a foreign key from Table 1 to Table 2, I need to get the most recent comment from table 2 based on table 1 req ID and show as a table format.
Solved! Go to Solution.
Hi @Power_Bi_User12 ,
Based on your description, I create a simple sample(To avoid numerical effects, I've modified some of the data):
Date Time =
CALCULATE ( MAX ( 'Comments Table'[Date Time] ) )
Comments =
CALCULATE (
MAXX ( 'Comments Table', 'Comments Table'[Comments] ),
FILTER ( 'Comments Table', MAX ( 'Comments Table'[Date Time] ) = [Date Time] )
)
Put these two measures in the Request Details table, if you don't want the data to be automatically aggregated, you can do so by selecting "show items with no data" for the Req ID.
The results are as follows:
Perhaps this will work, and if you have any questions, please provide me with more information to make sure we can better solve the problem for you!
An attachment for your reference. Hope it helps.
Best regards,
Community Support Team_ Scott Chang
If this post helps then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Power_Bi_User12 ,
Based on your description, I create a simple sample(To avoid numerical effects, I've modified some of the data):
Date Time =
CALCULATE ( MAX ( 'Comments Table'[Date Time] ) )
Comments =
CALCULATE (
MAXX ( 'Comments Table', 'Comments Table'[Comments] ),
FILTER ( 'Comments Table', MAX ( 'Comments Table'[Date Time] ) = [Date Time] )
)
Put these two measures in the Request Details table, if you don't want the data to be automatically aggregated, you can do so by selecting "show items with no data" for the Req ID.
The results are as follows:
Perhaps this will work, and if you have any questions, please provide me with more information to make sure we can better solve the problem for you!
An attachment for your reference. Hope it helps.
Best regards,
Community Support Team_ Scott Chang
If this post helps then please consider Accept it as the solution to help the other members find it more quickly.