Hi guys
Could you help me with the problemy bellow?
I need classificate the thirdy colum and last colum of independece way.
The thirdy colum I classificaded by the second collum and its ok, now I need classificate the last colum by ther alfabetc order, soo I wll compare the bouth and indeticate the divergences.
I did one exemplo in the excel where I put the result that I need
Thanks
Daniela Ferreira
Solved! Go to Solution.
See the working here - Open a blank query - Home - Advanced Editor - Remove everything from there and paste the below code to test
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("bcy5DYAwDAXQXVyniE+ODtaIsv8a+AgSBYWvryePAUgMDdDroFxJxbudoiu/YbbXUTimiAn3crby6+OwXMTMmk57HL+O8223cpsPKTcf", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [NF = _t, Qty = _t, Adress = _t, SKU = _t, #"Picking hour" = _t, #"Ordination picked" = _t, Letter = _t]),
#"Changed Type" = Table.TransformColumnTypes(Source,{{"NF", Int64.Type}, {"Qty", Int64.Type}, {"Adress", Int64.Type}, {"SKU", Int64.Type}, {"Picking hour", type time}, {"Ordination picked", Int64.Type}, {"Letter", type text}}),
BuffList = List.Buffer(List.Sort(#"Changed Type"[Letter])),
FinalTable = Table.FromColumns(Table.ToColumns(#"Changed Type") & {BuffList}, Table.ColumnNames(#"Changed Type")&{"Ordination Correct"}),
#"Added Custom" = Table.AddColumn(FinalTable, "Status", each if [Letter]=[Ordination Correct] then "Correct" else "Incorrect")
in
#"Added Custom"
How are you?
When I sort the last column, the others change too, Is there some way of sort without change the others?
Att
Can you give the logic for order decision?
Olá @Vijay_A_Verma
Primeiramente obrigado pela ajuda,
Estou anexando a tabela completa e vou explicar a lógica
O banco de dados me deu a hora exata em que o SKU (Item) foi escolhido, então criei a coluna "Ordenação escolhida" com base na coluna "Pick hour".
Depois trouxe a coluna "Carta" de uma tabela de dimensões onde tenho a carta registrada para cada posição, a melhor posição é A, a do meio é B e a pior é a C.
Agora dupliquei a coluna "Carta" e preciso classificá-la pela ordem alfabética que é a ordem correta a ser escolhida. Finalmente vou comparar a coluna "Carta escolhida" com "ordenação correta" e descobrir se foi escolhida corretamente ou não.
I hope I was clear, and sorry about my bad english
See the working here - Open a blank query - Home - Advanced Editor - Remove everything from there and paste the below code to test
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("bcy5DYAwDAXQXVyniE+ODtaIsv8a+AgSBYWvryePAUgMDdDroFxJxbudoiu/YbbXUTimiAn3crby6+OwXMTMmk57HL+O8223cpsPKTcf", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [NF = _t, Qty = _t, Adress = _t, SKU = _t, #"Picking hour" = _t, #"Ordination picked" = _t, Letter = _t]),
#"Changed Type" = Table.TransformColumnTypes(Source,{{"NF", Int64.Type}, {"Qty", Int64.Type}, {"Adress", Int64.Type}, {"SKU", Int64.Type}, {"Picking hour", type time}, {"Ordination picked", Int64.Type}, {"Letter", type text}}),
BuffList = List.Buffer(List.Sort(#"Changed Type"[Letter])),
FinalTable = Table.FromColumns(Table.ToColumns(#"Changed Type") & {BuffList}, Table.ColumnNames(#"Changed Type")&{"Ordination Correct"}),
#"Added Custom" = Table.AddColumn(FinalTable, "Status", each if [Letter]=[Ordination Correct] then "Correct" else "Incorrect")
in
#"Added Custom"
I think a simple sort on last column would give the required result.
Do you have a reason to believe that it won't work? Let us know.
Power BI release plans for 2023 release wave 1 describes all new features releasing from April 2023 through September 2023.
Make sure you register today for the Power BI Summit 2023. Don't miss all of the great sessions and speakers!
Join the biggest FREE Business Applications Event in LATAM this February.