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

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Top Solution Authors
Top Kudoed Authors
Users online (90,344)