web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Save single column of ...
Power Apps
Unanswered

Save single column of dates into a collection based on the month

(0) ShareShare
ReportReport
Posted on by

Wasn't exactly sure how to title this post so forgive me if it didn't make much sense. Hopefully, either my explanation or example will be able to help you understand my question. 

With that said, I currently have a Share Point list that has a Date/Time Column named Date (dd/mm/yyyy). It is full of different dates from throughout the year. I was wondering if/how I can take that single column of dates and add them to a collection, sorting them into columns based on the month. It's probably a simple solution but for some reason I can't seem to think of a way to do it, so any help will be greatly appreciated.

 

Example

 

What I have currently inside a SharePoint column 

Date
01/04/2022
01/01/2022
01/02/2022
01/06/2022
01/08/2022
01/11/2022
01/07/2022
02/01/2022
13/07/2022

 

What I want as a collection in PowerApps

JanFebMarAprilMayJuneJulyAugSepOctNovDec
01/01/202201/02/2022 01/04/2022 01/06/202201/07/202201/08/2022  01/11/2022 
02/01/2022     13/07/2022     

 

I am posting this late on a Friday afternoon so I apologise if I go silent for a couple days.

Categories:
I have the same question (0)
  • Verified answer
    v-yujincui-msft Profile Picture
    on at
    DataSource, Switch( Month(ColumnName), 1,Collect(CollectionName,{'1Jan': Text(ColumnName)}), 2,Collect(CollectionName,{'2Feb': Text(ColumnName)}), 3,Collect(CollectionName,{'3Mar': Text(ColumnName)}), 4,Collect(CollectionName,{'4April': Text(ColumnName)}), 5,Collect(CollectionName,{'5May': Text(ColumnName)}), 6,Collect(CollectionName,{'6June': Text(ColumnName)}), 7,Collect(CollectionName,{'7July': Text(ColumnName)}), 8,Collect(CollectionName,{'8Aug': Text(ColumnName)}), 9,Collect(CollectionName,{'9Sep': Text(ColumnName)}), 10,Collect(CollectionName,{'10Oct': Text(ColumnName)}), 11,Collect(CollectionName,{'11Nov': Text(ColumnName)}), 12,Collect(CollectionName,{'12Dec': Text(ColumnName)}) ) )

    vyujincuimsft_0-1645424082343.png

     

    Best Regards,

    Charlie Choi

    Hi @MathewM ,

     

    Please try the following formula:

    ForAll(
                          
  • MathewM Profile Picture
    on at

    @v-yujincui-msft Thanks for the help, this works great!

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 796 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 327 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard