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

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

Power Apps Community Call

Monthly Power Apps Community Call

Did you miss the call?? Check out the Power Apps Community Call here!

secondImage

Experience what’s next for Power Apps

See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Power Platform ISV STudio

Power Platform ISV Studio

ISV Studio is the go-to Power Platform destination for ISV’s to monitor & manage applications post-AppSource publish.

Top Solution Authors
Top Kudoed Authors
Users online (43,092)