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

Did you hear? There's a new SQL AI Developer certification (DP-800). Start preparing now and be one of the first to get certified. Register now

Reply
rodfernandez
Helper I
Helper I

Categorize data based on 3 columns

Hi,
i need to create a colum that asigne a value based on other 3 columns.

for example, i have this data table

 

IDDateType
10001-01-2021   1
10002-01-20212
10003-01-20211
10005-01-20213
10102-01-20211
10104-01-20212
10103-01-20213
10205-01-20211
10210-01-20211
10211-01-20211



I need to create a new column that for each same ID and type it, assign a letter (from "a" to "z") depending on which came first.
The result should be something like this

IDDateTypeNew Column
10001-01-2021   11.a
10002-01-202122.a
10003-01-202111.b
10005-01-202133.a
10102-01-202111.a
10104-01-202122.a
10103-01-202133.a
10205-01-202111.a
10210-01-202111.b
10211-01-202111.c



Thanks

1 ACCEPTED SOLUTION
Payeras_BI
Solution Sage
Solution Sage

Hi @rodfernandez ,

Find attached the pbix file with my proposal.

EDIT: Re attached again removing some unnecessary steps and adding List.Buffer.

 

If this post answered your question, please mark it as a solution to help other users find useful content.
Kudos are another nice way to acknowledge those who tried to help you.

J. Payeras
Mallorca, Spain

View solution in original post

2 REPLIES 2
Payeras_BI
Solution Sage
Solution Sage

Hi @rodfernandez ,

Find attached the pbix file with my proposal.

EDIT: Re attached again removing some unnecessary steps and adding List.Buffer.

 

If this post answered your question, please mark it as a solution to help other users find useful content.
Kudos are another nice way to acknowledge those who tried to help you.

J. Payeras
Mallorca, Spain

Perfect, Thanks

Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

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

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.