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

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

Reply
Toune84
Regular Visitor

Trouble with conditional columns

Hello all!

 

I have something quite difficult to do for an amateur like me on PowerBI. I am completely stuck on this. I would be really grateful if someone can help me.

Below is my database with 6 columns:

1. date (date of the transaction)

2. txHash (Id of the transaction)

3. nftld (reference of the product)

4. from (seller)

5. to (buyer)

6. price (price of the transaction)

PowerBi.PNG

What I want to know is: if I have a buyer (to) that has sold the same reference (nftld) he has previously purchased from a seller (from), how long has he kept the product (in number of days)?

 

This is too difficult for me. I tried with conditional columns but there is way too much conditions.

 

Thanks a lot !

Cheers

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Toune84 , You can get last date for same nftld like this , you can add more filters if needed

 

 

maxx(filter(Table, [nftld] =earlier([nftld]) && [date] < earlier([date])),[date])

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

2 REPLIES 2
Toune84
Regular Visitor

Thanks a lot for your answer! I combined your solution with this one: https://community.powerbi.com/t5/Desktop/Calculting-min-max-and-average-depending-on-weeks/m-p/25589...

amitchandak
Super User
Super User

@Toune84 , You can get last date for same nftld like this , you can add more filters if needed

 

 

maxx(filter(Table, [nftld] =earlier([nftld]) && [date] < earlier([date])),[date])

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

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.

Top Kudoed Authors