cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Super User III
Super User III

Re: Problems Sorting a text column from a Sharepoint list

No errors in the formula. Can you make a bigger screenshot. I can't see where you put the formula

It the formula put on a Gallery or a dropdown ? It should be on Items of the Gallery

------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

Highlighted
Regular Visitor

Re: Problems Sorting a text column from a Sharepoint list

Here the screens

02.png

 

03.png

 

No errors are showed, but in the filter date no info is showed as well

Highlighted
Regular Visitor

Re: Problems Sorting a text column from a Sharepoint list

updating... I saved the app, closed and reopened. Now I can see a list from 1, to 12 . Is it possible to show as "month year or year month"?

 

04.png

and now the second filter "Region" is not showing any data .

 

05.png

 

I tried to replace MonthYear by MonthSort on the second filter, but no data is showed also

 

Highlighted
Super User III
Super User III

Re: Problems Sorting a text column from a Sharepoint list

 
Highlighted
Regular Visitor

Re: Problems Sorting a text column from a Sharepoint list

I had put that formula on the second filter in order to, once we chose th month, the second filter will show only the Regions that had items on that month, and the same for the third filter, showing locations only for the regions remaining.

 

For the galeries I used this:

 

// All-ALL Selection
If(DDApp.Selected.Result="All" And DDApp1.Selected.Result="All" And DDApp2.Selected.Result="All", 'CTUX Executive Dashboard',
//MonthYear Selection
DDApp.Selected.Result<>"All" And DDApp1.Selected.Result="All" And DDApp2.Selected.Result ="All",
Filter('CTUX Executive Dashboard', MonthYear=DDApp.Selected.Result),
//MonthYear & Region Selection
DDApp.Selected.Result<>"All" And DDApp1.Selected.Result<>"All" And DDApp2.Selected.Result ="All",
Filter('CTUX Executive Dashboard', MonthYear=DDApp.Selected.Result And Region=DDApp1.Selected.Result),
//Region & LOC/AREA Selection
DDApp.Selected.Result="All" And DDApp1.Selected.Result<>"All" And DDApp2.Selected.Result <>"All",
Filter('CTUX Executive Dashboard', 'LOC/AREA'=DDApp2.Selected.Result And Region=DDApp1.Selected.Result),
//MonthYear & LOC/Area Selection
DDApp.Selected.Result<>"All" And DDApp1.Selected.Result<>"All" And DDApp2.Selected.Result ="All",
Filter('CTUX Executive Dashboard', MonthYear=DDApp.Selected.Result And 'LOC/AREA'=DDApp2.Selected.Result),
//LOC/Area Selection
DDApp.Selected.Result="All" And DDApp1.Selected.Result="All" And DDApp2.Selected.Result <>"All",
Filter('CTUX Executive Dashboard', 'LOC/AREA'=DDApp2.Selected.Result),
//Region Selection
DDApp.Selected.Result="All" And DDApp1.Selected.Result<>"All" And DDApp2.Selected.Result ="All",
Filter('CTUX Executive Dashboard', Region=DDApp1.Selected.Result),
//MonthYear & Region & LOC/AREA Selection
DDApp.Selected.Result<>"All" And DDApp1.Selected.Result<>"All" And DDApp2.Selected.Result <>"All",
Filter('CTUX Executive Dashboard', MonthYear=DDApp.Selected.Result And Region=DDApp1.Selected.Result And 'LOC/AREA'=DDApp2.Selected.Result)
)

 

____

 

Highlighted
Super User III
Super User III

Re: Problems Sorting a text column from a Sharepoint list

Change the Onstart formula to:

ClearCollect(MyDashboard,AddColumns('CTUX Executive Dashboard',"MonthSort",
Text(Date,"mmm-yyyy")&" "&"MonthNo:"&Month(Date)))
 
Maintain the other formula:
Sort(Distinct(MyDashboard, MonthSort),Result)
 
 
drop.JPG
------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.
 
Highlighted
Community Support
Community Support

Re: Problems Sorting a text column from a Sharepoint list

Hi @fyoshida :

Do you want to sort by the actual date represented by the string?

I think the key is to convert the string into date type.

I've made a test for your reference:

My data source(CDatabase):

 

Collect(CDatabase,{MonthYear:"Apr 2020"}
,{MonthYear:"Dec 2019"}
,{MonthYear:"Feb 2019"}
,{MonthYear:"Jan 2020"}
,{MonthYear:"Mar 2020"}
,{MonthYear:"May 2020"}
,{MonthYear:"Nov 2019"})

 

Add a Gallery and set it's Items property to :

Sort(Distinct(CDatabase, MonthYear), DateValue(Result),Ascending)

1.jpg

The date text has been arranged in the correct order.

Best Regards,

Bof

View solution in original post

Highlighted
Regular Visitor

Re: Problems Sorting a text column from a Sharepoint list

Hi,

 

I tried the last syntax and it does not worked

06.png

 

by some reason it does not sort properly, also when I try to link my other filter to this MonthSort I got an error, the same cannot be found.

Highlighted
Regular Visitor

Re: Problems Sorting a text column from a Sharepoint list

it worked perfectly, and the best was that I haven´t to change anything on the other filters and galleries.

 

the only thing is that I need to add every new month to the collection, right?

 

thank you so much

Fabio

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Watch Now

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 designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (4,435)