Forum Discussion

Balaraju's avatar
Balaraju
Helper III
2 years ago
Solved

Serial Number based on the Alphabetical order

Hi Everyone,

I have a scenario, I have multiple countries each country having multiple States. I need to create serial number column for states in each country. attaching sample data below.

CountryStates
IndiaAP
IndiaKarnataka
IndiaTamilanadu
IndiaUP
USAArizona
USAColorado
USAFlorida
USAMontana
USAMaine

 

Attaching expected out put.

CountryStatesSerial No
IndiaAP1
IndiaKarnataka2
IndiaTamilanadu3
IndiaUP4
USAArizona1
USAColorado2
USAFlorida3
USAMontana5
USAMaine4


Please help me out on this.
Thanks,
Bala.


  • Balaraju 

    you can try this to create a column

     

    Serial No = rankx(FILTER('Table','Table'[Country]=EARLIER('Table'[Country])),'Table'[States],,ASC)
     
     

1 Reply

  • Balaraju 

    you can try this to create a column

     

    Serial No = rankx(FILTER('Table','Table'[Country]=EARLIER('Table'[Country])),'Table'[States],,ASC)