dynamic rank/ordering for Beastmode

Is there a way to create a dynamic column via Beastmode that will rank the rows (1, 2, 3, etc...) based on the filtering and sorting for a table card? So however you filter and sort your table, there will be a rank column that adjusts so you can see the ranked order?


Answers

  • GrantSmith
    GrantSmith Indiana 🥷

    You can use a window function or fixed function to calculate the row number. The following example will rank them based on the Total Revenue column. You can replace that column with others to get the row number based on other values. This won't take into account ties.

    SUM(SUM(1)) OVER (ORDER BY `Total Revenue` DESC)
    
    **Was this post helpful? Click Agree or Like below**
    **Did this solve your problem? Accept it as a solution!**