This example illustrates how to use the conditional ranking functions.
Here is some example weather data:
In this case, you want to find out the second-most measures for rain, temperature, and wind in Center Town for the week.
You can see in the preview that the value is
1.32. Before adding it to your recipe, you change the step to the following:
The value is
For wind, you modify it to be the following, capturing the third-ranked value:
In the results, you notice that there are two values for
8.8. So you change the function to use the
KTHLARGESTUNIQUEIF function instead:
The result value is
7.6. Note that this value appears twice, so if you change the rank parameter in the above transformation to
4, the results would return a different unique ranked value (
You can choose to add any of these steps to generate an aggregated result. As an alternative, you can use a
derive transform to insert these calculated results into new columns.