Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
Hi all,
I have data in column A and I need to number it, but I need the numbering to restart when there is a new value. See example below:
Column A | |
ABC | 1 |
ABC | 2 |
ABC | 3 |
CDB | 1 |
CDB | 2 |
DCB | 1 |
ADB | 1 |
ADB | 2 |
My Column A data is coming from an ODBC database so it needs to stay connected so my data will refresh. Let me know if this doesn't make sense and I can try explaining it a different way.
Thanks!
Hi @Anonymous ,
I'd like to suggest you enter to query editor and use 'add index column' feature:
let Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WcnRyVorVwaSdXZxQaBdnCO3ogkTHAgA=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type text) meta [Serialized.Text = true]) in type table [#"Column A" = _t]), #"Changed Type" = Table.TransformColumnTypes(Source,{{"Column A", type text}}), #"Grouped Rows" = Table.Group(#"Changed Type", {"Column A"}, {{"Index", each Table.AddIndexColumn(_,"Index",1,1)[Index], type list}}), #"Expanded Count" = Table.ExpandListColumn(#"Grouped Rows", "Index") in #"Expanded Count"
Notice: these index numbers will auto increased every time your records increased.
Regards,
Xiaoxin Sheng
Check out my Cthulu quick measure:
https://community.powerbi.com/t5/Quick-Measures-Gallery/Cthulhu/td-p/509739