Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago
Solved

Table TOPn name

Hello, I´ve the Table1, and I need to create a new calculated table "Final Table" ( only the name of the camp Prod), but with the top 1 for each Region: Thanks.
  • amitchandak's avatar
    3 years ago

    Anonymous , Ideally you should use Rank/TOP/index and a visual table.

     

    but for calculated table try like

     

    selectcolumns(filter(addcolumns(Table, "_Rank", Rankx(filter(Table, [Region] = earlier([region]) ), [Sales],,desc,dense) ),[_Rank] =1), [Product])

     

     

    Index function: Top/Bottom Performer by name and value- https://youtu.be/HPhzzCwe10U