Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Hi guys,
I need an index column that starts first, as soon as an object name is in another column If there is nothing in the column, nothing should be returned:
| ObjectName | Index |
| Object1 | 1 |
| Object1 | 2 |
| Object1 | 3 |
| Object1 | 4 |
| Object1 | 5 |
| Object2 | 1 |
| Object2 | 2 |
| Object2 | 3 |
Thanks in advance
greetings Lukas
Hi, @Anonymous , it's fairly easy to achieve what you want in Power Query; you might want to try this,
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45W8k/KSk0uMVSK1SGXbYSbHQsA", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [ObjectName = _t]),
#"Sorted Rows" = Table.Sort(Source,{{"ObjectName", Order.Ascending}}),
#"Grouped Rows" = Table.Group(#"Sorted Rows", {"ObjectName"}, {{"All", each Table.SelectColumns(Table.AddIndexColumn(_, "Index", 1, 1, Int64.Type), {"Index"})}}),
#"Expanded All" = Table.ExpandTableColumn(#"Grouped Rows", "All", {"Index"}, {"Index"})
in
#"Expanded All"| Thanks to the great efforts by MS engineers to simplify syntax of DAX! Most beginners are SUCCESSFULLY MISLED to think that they could easily master DAX; but it turns out that the intricacy of the most frequently used RANKX() is still way beyond their comprehension! |
DAX is simple, but NOT EASY! |
Hello @CNENFRNL I created the ObjectName Column with Dax (I get the Name form another Tabel) so I cant do this with Power Query
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 6 | |
| 6 | |
| 4 | |
| 4 | |
| 4 |
| User | Count |
|---|---|
| 24 | |
| 17 | |
| 10 | |
| 7 | |
| 6 |