cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Batrisyia_
Helper I
Helper I

Arrange number in ascending order

Hi everyone,

Does anyone know on how to arrange number in ascending order for data table. I've tried to use sort by column and somehow it returned not in order. Here's the code:

SortByColumns(
Filter(
Mastercopy_1,
SYSTEM = Dropdown1.Selected.Result,
'Sub System'= Dropdown4_1.Selected.Result,
'EQUIPMENT TYPE'= Dropdown5_1.Selected.Result,
COMPONENT= Dropdown6_1.Selected.Result
),
"OPERATING_x0020_TEMP_x0020_(°C)",Ascending)

 

Batrisyia__0-1605062799146.png 

Batrisyia__1-1605062916993.png

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
mdevaney
Super User III
Super User III

@Batrisyia_ 
Your numbers appear to be stored as text so why not convert them to numbers in your datasource and your original code will work.

 

If you cannot make the conversion here's another way to do it without.

Sort(
    Filter(
        Mastercopy_1,
        SYSTEM = Dropdown1.Selected.Result,
        'Sub System'= Dropdown4_1.Selected.Result,
        'EQUIPMENT TYPE'= Dropdown5_1.Selected.Result,
        COMPONENT= Dropdown6_1.Selected.Result
    ),
    Value('OPERATING_x0020_TEMP_x0020_(°C)'),
    Ascending
)

 

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

View solution in original post

3 REPLIES 3
mdevaney
Super User III
Super User III

@Batrisyia_ 
Your numbers appear to be stored as text so why not convert them to numbers in your datasource and your original code will work.

 

If you cannot make the conversion here's another way to do it without.

Sort(
    Filter(
        Mastercopy_1,
        SYSTEM = Dropdown1.Selected.Result,
        'Sub System'= Dropdown4_1.Selected.Result,
        'EQUIPMENT TYPE'= Dropdown5_1.Selected.Result,
        COMPONENT= Dropdown6_1.Selected.Result
    ),
    Value('OPERATING_x0020_TEMP_x0020_(°C)'),
    Ascending
)

 

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

View solution in original post

Thank you @mdevaney. Finally the code is working. May I know how to convert them into number in datasource?

@Batrisyia_ 
Change the column type from single line text to number if you are using SharePoint.

Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

R2 (Green) 768 x 460px.png

Microsoft Dynamics 365 & Power Platform User Professionals

DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.

Users online (1,118)