This is best Fabric, Power BI, SQL and AI community event. How do we know? The last event sold out! Save €200 with code FABCMTY200.
Register nowA new Data Days event is coming soon! This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. Don't miss out.
Hi
I need to add the calculated index column to the table by a DAX formula.
Rgds
Henrik
Solved! Go to Solution.
Hi @Henrik_99,
It seems like a multiple column sort recruitment, maybe you can take a look at following thread about using isonorafter to sort multiple columns:
Regards,
Xiaoxin Sheng
Hi all, thanks for reply!!
I`ll try to clarify. This figure might help. 6121/TEST-LINE-1 is the "mother" of "6121/ST-TESTPIPE" with "children-ID`S.
It`s all about to get Test-Line-1 in first row and ST-TestPipe in second row with children ids etc..
If you have a solution that would be great. Thanks.
Hi @Henrik_99,
It seems like a multiple column sort recruitment, maybe you can take a look at following thread about using isonorafter to sort multiple columns:
Regards,
Xiaoxin Sheng
Hi,
Basis what do you want to create the Index column - the first 4 characters of the Key column? Clarify.
Seems like a variation of Cthulhu - https://community.powerbi.com/t5/Quick-Measures-Gallery/Cthulhu/td-p/509739
Hi @Henrik_99
I think you have to do it with Power Query like this:
// Table
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("pdM9DoAgDAXguzBrLC0qjEY8AWzGG3j/2Z9oECbiSxgK6fdoQlhX5VhTF5cQVaO+i2n2YkSrrcmb7noi/ZbXcbsXjvt6l3acRQx4xIhHWDzCwRFC+BTmE1G8tSEfWDTnHc8NnDJLIBUgjSOZNYDtATsAdgSsBaz7b5kAe37+7QA=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type text) meta [Serialized.Text = true]) in type table [A = _t, B = _t, C = _t, D = _t, E = _t, KEY = _t]),
#"Changed Type" = Table.TransformColumnTypes(Source,{{"A", type text}, {"B", type text}, {"C", type text}, {"D", type text}, {"E", type text}, {"KEY", type text}}),
#"Grouped Rows" = Table.Group(#"Changed Type", {"A"}, {{"Gruppieren", each _, type table [A=text, B=text, C=text, D=text, E=text, KEY=text]}}),
#"Added Custom" = Table.AddColumn(#"Grouped Rows", "Index", each Table.AddIndexColumn([Gruppieren], "Index", 1, 1)),
#"Removed Other Columns" = Table.SelectColumns(#"Added Custom",{"Index"}),
#"Expanded {0}" = Table.ExpandTableColumn(#"Removed Other Columns", "Index", {"A", "B", "C", "D", "E", "KEY", "Index"}, {"A", "B", "C", "D", "E", "KEY", "Index.1"})
in
#"Expanded {0}"
Regards FrankAT
Hi @Henrik_99
Try a column
Index =
RANKX (
FILTER('Table','Table'[A] = EARLIER('Table'[A])),
'Table'[KEY]
)
it works perfectly. Thanks.
Check out the May 2026 Power BI update to learn about new features.
Sign up to receive a private message when registration opens and key events begin.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
| User | Count |
|---|---|
| 31 | |
| 26 | |
| 23 | |
| 22 | |
| 15 |
| User | Count |
|---|---|
| 62 | |
| 47 | |
| 28 | |
| 23 | |
| 19 |