Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

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
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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