Hi folks, this one has been stumping me. Apologies, I cannot download XLB2B as I'm not on my personal pc. Using Office 365.
For those familiar with T-SQL language, you will know that there is a very helpful function called ROW_NUMBER which allows you to partition data based on criteria. The most common use case for me is to identify in our transactional data, the first or last transaction that happened for every policy. My data is a list of policies and policyv ersions. So in my example below, a new 'policy version' is created for each policynumber when a new transaction is done, going up in increments of 1. So the same policynumber occurs, having mutiple policyversion going from 1 upwards. Below is just a snippet of the data
In T-SQL, ROW_NUMBER will then create a new column and label the rows based on what I specify in my partition and how I choose to order my data. Below is when I partition by policynumber and order by policyversion descending. I think then use an outer query to only select where RowNumber = 1
I'm trying to replicate the same functionality using dynamic arrays. I can use SORTBY to sort my data by policynumber and policyversion descending but I can't figure out how to then using that resultant array to filter to only take the highest policyversion. I think some combo of FILTER based on max policyversion or something along those lines.
Below is the desired result.
Any ideas?
Thanks in advance
For those familiar with T-SQL language, you will know that there is a very helpful function called ROW_NUMBER which allows you to partition data based on criteria. The most common use case for me is to identify in our transactional data, the first or last transaction that happened for every policy. My data is a list of policies and policyv ersions. So in my example below, a new 'policy version' is created for each policynumber when a new transaction is done, going up in increments of 1. So the same policynumber occurs, having mutiple policyversion going from 1 upwards. Below is just a snippet of the data
In T-SQL, ROW_NUMBER will then create a new column and label the rows based on what I specify in my partition and how I choose to order my data. Below is when I partition by policynumber and order by policyversion descending. I think then use an outer query to only select where RowNumber = 1
I'm trying to replicate the same functionality using dynamic arrays. I can use SORTBY to sort my data by policynumber and policyversion descending but I can't figure out how to then using that resultant array to filter to only take the highest policyversion. I think some combo of FILTER based on max policyversion or something along those lines.
Below is the desired result.
Any ideas?
Thanks in advance