cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
foxglove666 Regular Visitor
Regular Visitor

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

Accepted Solutions
foxglove666 Regular Visitor
Regular Visitor

Re: Return the value from the next matching row

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.
2 REPLIES 2
Community Support Team
Community Support Team

Re: Return the value from the next matching row

@foxglove666,

 

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-o...

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.
foxglove666 Regular Visitor
Regular Visitor

Re: Return the value from the next matching row

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.