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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Anonymous
Not applicable

Return the value from the next matching row

Hi Experts,

 

I have a table of callers and I want to be able to add a new column which shows the next time they called.

 

so I have columns

DateTime | Customer ID | Session ID |

 

I want to add a new column of "Called Back" which will look down for the next row that matches the Customer ID and then enter the Session ID so I can look up that call.

 

I'm struggling to find a solution for this, so any help would be great.

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Cheers,

I actually found a solution by using power pivot. Filter, sort, then add and index column from 0 and an index column from 1 and join to itself. And then an if statement for if the customers match.

View solution in original post

2 REPLIES 2
v-chuncz-msft
Community Support
Community Support

@Anonymous,

 

You may refer to the post below and change the code accordingly.

https://community.powerbi.com/t5/Desktop/Finding-the-previos-occurrence-within-same-table-based-on-one/m-p/342607#M153516

Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

Cheers,

I actually found a solution by using power pivot. Filter, sort, then add and index column from 0 and an index column from 1 and join to itself. And then an if statement for if the customers match.

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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 Solution Authors