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

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

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
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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