The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
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.