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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

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
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.