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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
ElliotK
Helper I
Helper I

Create new column for MAXDate

Hello,

 

I wish to create a column that calculates that Max Data where the TaskPosition is "Completed" for TaskGroupID 13, within eID 53. 

 

IDeIDTaskGroupIDTaskStatusIDTaskStatusStartDateEndDateTaskPosition
10015311ProcessingNULLNULL 
10025321ProcessingNULLNULL 
10035331ProcessingNULLNULL 
10045342QualityNULLNULL 
10055352QualityNULLNULL 
10065362QualityNULLNULL 
10075372QualityNULLNULL 
10085382QualityNULLNULL 
10095393IssuanceNULLNULL 
101053103IssuanceNULLNULL 
101153113IssuanceNULLNULL 
101253124SigningNULLNULL 
101353134SigningNULL01/08/2022Completed

 

If there is a record after completed, do not show the max. 

 

IDeIDTaskGroupIDTaskStatusIDTaskStatusStartDateEndDateTaskPosition
10015311ProcessingNULLNULL 
10025321ProcessingNULLNULL 
10035331ProcessingNULLNULL 
10045342QualityNULLNULL 
10055352QualityNULLNULL 
10065362QualityNULLNULL 
10075372QualityNULLNULL 
10085382QualityNULLNULL 
10095393IssuanceNULLNULL 
101053103IssuanceNULLNULL 
101153113IssuanceNULLNULL 
101253124SigningNULLNULL 
101353134SigningNULL01/08/2022Completed
101353134SigningNullNULL 

 

I wanted to do this as a column as I wish to calculate the difference between the very first start date and the very last end date where the status is completed. 

 

Any help appreciated. 

1 ACCEPTED SOLUTION
v-stephen-msft
Community Support
Community Support

Hi @ElliotK ,

 

Please try

Column = CALCULATE(MAX('Table (2)'[EndDate]),FILTER('Table (2)',[TaskPosition]="Completed"&&[eID]=EARLIER('Table (2)'[eID])))

vstephenmsft_0-1659605858733.png

 

 

 

Best Regards,

Stephen Tao

 

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

View solution in original post

1 REPLY 1
v-stephen-msft
Community Support
Community Support

Hi @ElliotK ,

 

Please try

Column = CALCULATE(MAX('Table (2)'[EndDate]),FILTER('Table (2)',[TaskPosition]="Completed"&&[eID]=EARLIER('Table (2)'[eID])))

vstephenmsft_0-1659605858733.png

 

 

 

Best Regards,

Stephen Tao

 

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

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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