Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Bharathi_99
Helper IV
Helper IV

Power query- Key Number for the records

Hi All,

I need to give number for each record of ACE_VALUE column
I have concatenated 3 columns and created AC_VALUE column and i want to see key number like below example in a newly created custom column in power query

ACE_VALUEKey Number
123ABC22/3/241
123CDA3/5/20212
123ABC22/3/241
568CDA31/1/20073
123CDA3/5/20212

 

Please reply
Thanks!!

1 ACCEPTED SOLUTION
Ritaf1983
Super User
Super User

Hi @Bharathi_99 
You can duplicate the table and remove duplicates :

Ritaf1983_0-1712132119395.pngRitaf1983_1-1712132172495.png

Add an index column :

Ritaf1983_2-1712132229955.png

And merge the tables:

Ritaf1983_3-1712132328116.pngRitaf1983_4-1712132363142.pngRitaf1983_5-1712132397608.png

The table that merged can be unchecked from loading to the model

Ritaf1983_6-1712132465397.png

pbix is attached

If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly

View solution in original post

5 REPLIES 5
Ritaf1983
Super User
Super User

Hi @Bharathi_99 
You can duplicate the table and remove duplicates :

Ritaf1983_0-1712132119395.pngRitaf1983_1-1712132172495.png

Add an index column :

Ritaf1983_2-1712132229955.png

And merge the tables:

Ritaf1983_3-1712132328116.pngRitaf1983_4-1712132363142.pngRitaf1983_5-1712132397608.png

The table that merged can be unchecked from loading to the model

Ritaf1983_6-1712132465397.png

pbix is attached

If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly

Hello  @Ritaf1983 
It worked...Thanks A lot!!😊

Happy to help 🙂

Shreeram04
Resolver III
Resolver III

Hi @Bharathi_99 ,

 

Please refer to the screenshot below and measure.

 

Key Number1 =
RANKX(
    VALUES('Table'[ACE_VALUE]),
    'Table'[ACE_VALUE],
    ,
    ASC,
    Dense
)


Shreeram04_0-1712131813501.png

If this post helps, please consider accept as solution to help other members find it more quickly.

 

Thanks,

Hari R

 

Hi @Shreeram04 Thanks for replying
How to do it in power query
I am doing all transformations in Dataflows so I need to add custom column in power query
Can you help me with taht please

Thanks a lot

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.