Forum Discussion

Marlonrb's avatar
Marlonrb
Frequent Visitor
10 years ago

Custom column Index or Ranking by other column

Hi Team!!!

I have a table with AccountReceived informations and Clients.

 

I need to create a new custom column (like an Index) that define an order according the client column changed.

 

I mean: create like a rank column, but it will only be incremented when the client value change.

 

In the end, What I need is, work with only the TOP20 clients informations. (I already have an ordered select query)

 

tks

8 Replies

  • Greg_Deckler's avatar
    Greg_Deckler
    Community Champion

    I would create another table with just the customers and put an index column on it. Then you should be able to relate the two tables and use the "Sort by" functionality or just filter your visual/page/report to that ID field <= 20.

     

    In Query Editor, go to Add Column and then use the Add Index Column drop down in the General area of the ribbon (1st box).

    • Marlonrb's avatar
      Marlonrb
      Frequent Visitor

      I used the same select, because we've half milion records in our client table.

       

    • Marlonrb's avatar
      Marlonrb
      Frequent Visitor

      Hi my friend,  

      Can I bring to P.BI, my client table even it has half milion of records?

       

      or How can I create a RANK measure in my table? I need to rank and show only all my 20 big clients

      • Greg_Deckler's avatar
        Greg_Deckler
        Community Champion

        Sure, half a million records should not be too much of a problem, I've created datasets with millions of rows in them.

    • Ying_P's avatar
      Ying_P
      Helper I

      Hi,

       

      I am super new to Power BI and looking for the information about how to add an index column on a table created in Power BI.

       

       

      Could you explain this with a bit more details? Thanks a lot!

       

      • Marlonrb's avatar
        Marlonrb
        Frequent Visitor

        Ying_P

        In the Query Editor you can create a different type of index column.