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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

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
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

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.