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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
Anonymous
Not applicable

Unique contract

Hi All, I don't know if I put this in the right forum now, but I hope you can help me.

 

I have a variable "Contract type" were I have all the contracts that a person can sign, four different ones. I only want to extract the latest of the two most recent "pre-contract" or "Rental agreement" for each unique person (CostumerId)

 

Costumer id Contract typ Contract dateWhat I wont have
1pre-contract2020-01-01No
1Rental agreement2020-02-01Yes
2pre-contract2020-03-01Yes
    

 

 

1 ACCEPTED SOLUTION
philouduv
Resolver III
Resolver III

Hello @Anonymous ,

I'm sure there exist more optimize way to do that but a quick calculated column such as the following screen can do the trick.

philouduv_0-1682605690628.png


To do so I copy paste your data source, kept your column What I want have as reference and built a new calculated column called Dax_column

Best regards,




View solution in original post

1 REPLY 1
philouduv
Resolver III
Resolver III

Hello @Anonymous ,

I'm sure there exist more optimize way to do that but a quick calculated column such as the following screen can do the trick.

philouduv_0-1682605690628.png


To do so I copy paste your data source, kept your column What I want have as reference and built a new calculated column called Dax_column

Best regards,




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.

Top Solution Authors