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
Anonymous
Not applicable

how to calculate max dates in a table view from another table

i need to calculte Max dates from another existing table as per available code2 in a table view column, (not as a measure).
As per attcahment in excel can see that there are 2 table (Baseline dates & code 2).  i need in table view column of code 2 Max date for each Code from Baseline date.

Max date.xlsx

in code 2 table need Max date for each activity code 2 from baseline table.

1 ACCEPTED SOLUTION
123abc
Community Champion
Community Champion

Step1: ensure your both talbe coneecteded properly, n this case, you’ll need to ensure that Activity_Code_2 is available in both the Baseline Dates table and the Code 2 table. 

Calculated Column: You can use a calculated column in the Code 2 table to fetch the maximum date from the Baseline Dates table for each Activity_Code_2.

 

In the Modeling tab, click on "New Column" to create a calculated column. and use following DAX formuala

 

Max Date =
CALCULATE(
MAX('Baseline Dates'[BL1 Finish]),
FILTER(
'Baseline Dates',
'Baseline Dates'[Activity_Code_2] = 'Code 2'[Activity_Code_2]
)
)

 

The new column will show the maximum finish date (BL1 Finish) for each Activity_Code_2 in the Code 2 table.

 

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

@123abc  thank u bro . 

123abc
Community Champion
Community Champion

Step1: ensure your both talbe coneecteded properly, n this case, you’ll need to ensure that Activity_Code_2 is available in both the Baseline Dates table and the Code 2 table. 

Calculated Column: You can use a calculated column in the Code 2 table to fetch the maximum date from the Baseline Dates table for each Activity_Code_2.

 

In the Modeling tab, click on "New Column" to create a calculated column. and use following DAX formuala

 

Max Date =
CALCULATE(
MAX('Baseline Dates'[BL1 Finish]),
FILTER(
'Baseline Dates',
'Baseline Dates'[Activity_Code_2] = 'Code 2'[Activity_Code_2]
)
)

 

The new column will show the maximum finish date (BL1 Finish) for each Activity_Code_2 in the Code 2 table.

 

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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