I have an issue with the group by function where the combined values are combination of 2 fields :
Field 1 = numbers
Field 2 = text
Ā
I’ve used the following formula to group rows :
= Table.Group(#”customized column”, {“FactorA”, “FactorB”}, {{“Combined value”, each Text.Combine((List.Sort( [Field1 & Field2], Order.Ascending),”#(lf)”), type nullable text}})
Ā
with this formula, rows into each combined value is sorted but as following :
1 xxxx
10 xxxx
2 xxxx
while I’m looking for an order as :
1 xxxx
2 xxxx
10 xxxx
Any ideas to help with are more than welcome !
Many thanks in advance for your help ! Ā
Regards,
—————————— EMMY ALAMI Data analyst ——————————
Sharavan Kumar
Member
October 25, 2022 at 12:21 AM
Check the data format of that number column
——————————————-
EMMY ALAMI
Member
October 25, 2022 at 5:03 AM
HI, It’s a number bit once mergerd with the etxt format it’s a text Thanks for your reply !
—————————— EMMY ALAMI Data analyst —————————— ——————————————-
Fredy Chen
Member
October 25, 2022 at 5:51 AM
Can you sort before the combine?
—————————— Fredy Chen —————————— ——————————————-
Amon Seagull
Member
October 26, 2022 at 9:38 AM
If you like this approach (which I do, if it fits your problem), take care that sorting is not guaranteed to work if you don’t apply a buffer step. Imke Feldman raised that here:
If you still have the number column in your table, you can use it to sort. Go to the data view and select the text column you want to sort. Select the Column Tools menu and click on the button for “Sort by Column”. Select your number column and now this new text field will be sorted by the number column.
Many thanks !Ā I finally used the method of adding leading zeros for Nbres that are <9 so at the end I have a list : 01 / 02/ 03/ …. / 10 / 11/ … and it works šĀ Thanks again !
—————————— EMMY ALAMI Data analyst —————————— ——————————————-
Please note:
This action will also remove this member from your connections and send a report to the site admin.
Please allow a few minutes for this process to complete.
Report
You have already reported this .
Welcome to our new site!
Here you will find a wealth of information created for peopleĀ that are on a mission to redefine business models with cloud techinologies, AI, automation, low code / no code applications, data, security & more to compete in the Acceleration Economy!