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
Super User

@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
Super User

@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
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

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.

Users online (2,577)