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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.