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

Get certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now

【BUG】Expanded Table ,the index of the previous step of the data has changed

I only made an operation to extend the table, but the index of the previous step has changed. I don't know why this is the cause. 

 

first step

the second step

Just did the following:

steps

 

I don't know if this is a bug, I did some test data, Below is my repro step:

 


let 源 = Excel.CurrentWorkbook(){[Name="Team"]}[Content], #"Step 1 Change Type" = Table.TransformColumnTypes(源,{{"UserName", type text}, {"Score", Int64.Type}}), #"Step 2 Sort" = Table.Sort(#"Step 1 Change Type",{{"UserName", Order.Descending}, {"Score", Order.Descending}}), #"Step 3 Group By" = Table.Group(#"Step 2 Sort", {"UserName"}, {{"All Line", each Table.AddIndexColumn(_, "Rank", 1, 1), type table}}), #"Step 4 Expand “All Line”" = Table.ExpandTableColumn(#"Step 3 Group By", "All Line", {"Score", "Rank"}, {"Score", "Rank"}), #"Step 5 Meger Query" = Table.NestedJoin(#"Step 4 Expand “All Line”", {"UserName"}, Level, {"UserName"}, "Level", JoinKind.LeftOuter), #"Step 6 Expand ""Level""" = Table.ExpandTableColumn(#"Step 5 Meger Query", "Level", {"Level"}, {"Level.1"}) in #"Step 6 Expand ""Level"""

Step 2 Sort two column2.png

 

Step 3 I added an index in order to record rank 3.png

 

Step 4 Expand Table4.png

 

Step 5 Left join query, join the level table below5.png

 

5-1.png

 

Step 6 Expanded Table, the index of the previous step of the data has changed6.png

 

 

Since the index is added before, why is the order of the latter still changing? This will cause trouble for people. Later I found that if you add an index with a custom formula after sorting, the results displayed will be incorrect. If there is no sorting that starts first, the result of the last step is the same as the result of the step of indexing.

 

Expect: The result I expect is that what the eye sees is the desired result, and does not cause harm to others.

 

In addition: I don’t know how to attach test data, if you need I can send it by email.

 

 

 

 

Status: New
Comments
v-qiuyu-msft
Community Support

Hi @Anonymous, 

 

Please upload sample test data ad pbix file to your OneDrive then paste the share link here. Do not share sensitive data with us. 

 

Best Regards,
Qiuyun Yu 

MBoivie
New Member

Hi,

 

I'm having the same problem, example file and the two source files uploaded here:

https://drive.google.com/drive/folders/1zSyWbvJALgTwl3wKs8jLf_1oIRuB0EHQ?usp=sharing 

dufu
Regular Visitor

Searched for the same, sorting prior to expand step might give the trick. See also here: Disappearing line when expanding a table column - Microsoft Power BI Community