Skip to main content
Microsoft logo
Power Apps
    • AI Builder
    • Automate processes
    • Azure + Power Apps
    • Build apps
    • Connect data
    • Pages
    • Take a guided tour
  • Pricing
    • Overview
    • Become a Partner
    • Find a Partner
    • Find partner offers
    • Partner GTM Resources
    • Blog
    • Customer stories
    • Developer Plan
    • Documentation
    • For IT Leaders
    • Roadmap
    • Self-paced learning
    • Webinars
    • App development topics
    • Overview
    • Issues
    • Give feedback
    • Overview
    • Forums
    • Galleries
    • Submit ideas
    • User groups
    • Register
    • ·
    • Sign in
    • ·
    • Help
    Go To
    • Power Apps Community
    • Welcome to the Community!
    • News & Announcements
    • Get Help with Power Apps
    • Building Power Apps
    • Microsoft Dataverse
    • AI Builder
    • Power Apps Governance and Administering
    • Power Apps Pro Dev & ISV
    • Power Apps Portals
    • Connector Development
    • Power Query
    • GCC, GCCH, DoD - Federal App Makers (FAM)
    • Power Platform Integration - Better Together!
    • Power Platform Integrations
    • Power Platform and Dynamics 365 Integrations
    • Community Blog
    • Power Apps Community Blog
    • Galleries
    • Community Connections & How-To Videos
    • Community App Samples
    • Webinars and Video Gallery
    • Canvas Apps Components Samples
    • Kid Zone
    • Emergency Response Gallery
    • Events
    • 2021 MSBizAppsSummit Gallery
    • 2020 MSBizAppsSummit Gallery
    • 2019 MSBizAppsSummit Gallery
    • Community Engagement
    • Community Calls Conversations
    • Experimental
    • Error Handling
    • Power Apps Experimental Features
    • Community Support
    • Community Accounts & Registration
    • Using the Community
    • Community Feedback
    cancel
    Turn on suggestions
    Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
    Showing results for 
    Search instead for 
    Did you mean: 
    • Power Apps Community
    • Galleries
    • Community App Samples
    • How to download the converted csv data

    How to download the converted csv data

    09-28-2020 02:05 AM

    Anonymous
    Not applicable
    1644 Views
    LinkedIn LinkedIn Facebook Facebook Twitter Twitter
    mdevaney
    mdevaney Community Champion
    Community Champion
    • Mark as New
    • Bookmark
    • Subscribe
    • Mute
    • Subscribe to RSS Feed
    • Permalink
    • Print
    • Report Inappropriate Content

    Collections Cookbook: 50+ Visual Examples & Code

    ‎01-05-2020 08:42 PM

    CollectionsCookBook_Top.png

     

    Welcome to the PowerApps “Collections Cookbook”.

    Inside you will find over 50 examples of how to do various tasks with Collections. Each page contains code and a visual to show what the code is doing.

    COPY + PASTE code from the cookbook into your own app.  Just change the Collection name and column names to match your own.

    Add the app to a Microsoft Teams tab for instant access.  I like to keep the Collections Cookbook close by while coding PowerApps.  That way I can quickly look for code to solve the problem I am having and the solutions are all in one place. 

     

    Calls To Action

    Give a Thumbs Up if you liked the app to make it easier for others to find in the gallery

    Post a reply for any suggestions for Collections Examples you want to see added in a future version.

    Send me a message for any bugs your encountered and I will try to fix them quickly

    Follow me on Twitter for more PowerApps tips https://twitter.com/mattbdevaney 

     

    Full List of Collections Examples

    Basics
    What Is A Collection?
    Create A Collection
    Create A Single Column Collection
    Insert A New Row
    Insert Multiple New Rows
    Change The Value In A Cell

    Selecting Data

    First Rows Of A Collection
    Last Rows Of A Collection
    Middle Rows Of A Collection
    Get A Column of Values
    Get Row Using LookUp On A Unique Value
    Get A Value In A Cell
    Filter A Collection
    Filter A Collection With AND Condition
    Filter A Collection OR Condition
    Ungroup A Table Within A Cell
    Get A Value From A Table Within A Cell

     

    Summarizing Data

    Calculate the Sum, Count, Average, Max, Min
    Group By And Sum Values
    Group By And Count Values
    Group By And Average Values
    Group By And Maximum Values
    Group By And Minimum Values
    Get The Rows With Top 10 Values
    Get The Rows With Bottom 10 Values
    Rank From Highest To Lowest With Ties
    Count The Unique Values In A Column
    Calculate the SumProduct of Two Columns
    Add A Column Showing Percentage Of Total

     

    Transforming Data

    Sort A Collection By One Or More Columns
    Join One Column From Another Collection
    Join All Columns From Another Collection
    Split A Text Column By Delimeter
    Merge Two Columns Into A Single Column
    Replace A Whole Row
    Replace All Values In A Column
    Fill Records With Missing Values
    Round The Values In A Column
    Randomly Shuffle The Order Of A Collection
    Fill Blanks In A Column With Last Non-Blank Value
    Add A Row Number Column
    Rename A Column
    Remove A Row
    Remove All Rows
    Remove One Or More Columns
    Remove All Columns Except
    Remove The Duplicates From 1 Column
    Remove The Duplicates From 2 Columns
    Get The Matching Values Within 2 Collections
    Change Date Format In A Column
    Stack Value From Multiple Columns In A Single Column

     

    Exporting Data

    Export Collection To A Datasource
    Export Collection To JSON
    Export Collection To CSV
    Export Collection To HTML Table

     

    (Screenshot Of The Menu)

    CollectionsCookBook_Menu.png

     

    I wish you the best of luck in building your PowerApp!

     

    Preview file
    196 KB
    Collections Cookbook 20200324.msapp
    Labels:
    • Labels:
    • Formulas and Controls
    • Offline App Design
    • clear
    • clearcollect
    • Collect
    • Collections
    • Collections Examples
    Message 1 of 36
    40,528 Views
    141 Kudos
    Reply
    • All forum topics
    • Previous Topic
    • Next Topic
    • « Previous
      • 1
      • 2
      • 3
      • 4
    • Next »
    code-exploder
    code-exploder
    New Member
    • Mark as New
    • Bookmark
    • Subscribe
    • Mute
    • Subscribe to RSS Feed
    • Permalink
    • Print
    • Report Inappropriate Content

    ‎07-21-2020 10:28 AM

    Thank you so much.  Being able to see one of your examples has helped me solve a problem I have been stuck on for hours.

    🙏

    Message 21 of 36
    1,707 Views
    2 Kudos
    Reply
    RoScha
    RoScha Helper V
    Helper V
    • Mark as New
    • Bookmark
    • Subscribe
    • Mute
    • Subscribe to RSS Feed
    • Permalink
    • Print
    • Report Inappropriate Content

    ‎09-06-2020 01:42 AM

    Thank you for this compilation

    Message 22 of 36
    1,681 Views
    2 Kudos
    Reply
    Anonymous
    Not applicable
    • Mark as New
    • Bookmark
    • Subscribe
    • Mute
    • Subscribe to RSS Feed
    • Permalink
    • Print
    • Report Inappropriate Content

    ‎09-28-2020 02:05 AM

    Thank you for your work. I learned how to convert data to a string in csv format with the Ex37 case. But I want to download a csv file down directly. I try to use the "Export" control, but the downloaded file is a zip file and the unzipped file is a json file set, which doesn't meet my requirements. I've tried other ways but it doesn't work, any suggestions?

    Message 23 of 36
    1,644 Views
    1 Kudo
    Reply
    jeffapv
    jeffapv
    Frequent Visitor
    • Mark as New
    • Bookmark
    • Subscribe
    • Mute
    • Subscribe to RSS Feed
    • Permalink
    • Print
    • Report Inappropriate Content

    ‎07-10-2021 06:07 PM

    I absolutely love your tuts, blog, and clear instructions. Saved me a lot of anguish. I am struggling with understanding how to import a msapp file into Power Apps environment and also into the MS Teams development environment which requires a zip extension. have googled it with no luck on both. I am on a Mac and do not have PA Studio but use the web based environment . Am I missing something or do something wrong as I want to look at your Collections App and learn more about them. Thanks in advance for any advice or help. Cheers Jeff

    Message 24 of 36
    1,443 Views
    2 Kudos
    Reply
    mdevaney
    mdevaney Community Champion
    Community Champion
    • Mark as New
    • Bookmark
    • Subscribe
    • Mute
    • Subscribe to RSS Feed
    • Permalink
    • Print
    • Report Inappropriate Content

    ‎07-10-2021 07:10 PM

    @jeffapv 
    Hello Jeff!

    An msapp file can be imported by creating a new app, then going to the top menu and browsing to File > Open > Browse.  Then you can select the file from your local drive.

    If you like the Collections Cookbook please be sure to give it a Thumbs Up on the 1st page if you haven't already.

    Cheers!

    Matt D.

    Message 25 of 36
    1,440 Views
    2 Kudos
    Reply
    jeffapv
    jeffapv
    Frequent Visitor
    In response to mdevaney
    • Mark as New
    • Bookmark
    • Subscribe
    • Mute
    • Subscribe to RSS Feed
    • Permalink
    • Print
    • Report Inappropriate Content

    ‎07-11-2021 12:32 AM

    Hello Matt, thanks for the prompt response and support. Yes, will give a thumbs up, new to this, so will get onto to it asap. 

     

    I have got the msapp to import into the Power Apps web dev, as you suggested. Thanks heaps for that.

     

    My issue is that you cannot do the same in the MS Teams App dev environment. Not sure why, but made a new app, and there is not "File - Open"

     

    It also falls when I export form Power apps and then try to import into teams environment. Will keep trying, but the integration into teams is a bit clunky.

     

    Cheers Jeff

    Message 26 of 36
    1,432 Views
    1 Kudo
    Reply
    jeffapv
    jeffapv
    Frequent Visitor
    • Mark as New
    • Bookmark
    • Subscribe
    • Mute
    • Subscribe to RSS Feed
    • Permalink
    • Print
    • Report Inappropriate Content

    ‎07-11-2021 01:18 AM

    Got it...had to make up a new solution in Power Apps, then import apps into the new solution, then export solution with "Unmanaged" set, and then import the zip into MS teams. Finally...lol. all good.

     

    Cheers Jeff

    Message 27 of 36
    1,437 Views
    1 Kudo
    Reply
    AmDev
    Super User AmDev
    Super User
    • Mark as New
    • Bookmark
    • Subscribe
    • Mute
    • Subscribe to RSS Feed
    • Permalink
    • Print
    • Report Inappropriate Content

    ‎08-11-2021 05:11 AM

    Many thanks for sharing - This is an excellent resource! 👏👏👏

    Message 28 of 36
    1,299 Views
    1 Kudo
    Reply
    w1sd0m
    w1sd0m Advocate II
    Advocate II
    In response to mdevaney
    • Mark as New
    • Bookmark
    • Subscribe
    • Mute
    • Subscribe to RSS Feed
    • Permalink
    • Print
    • Report Inappropriate Content

    ‎11-12-2021 07:53 PM

    Thank you sir!

    Message 29 of 36
    981 Views
    1 Kudo
    Reply
    SGusau
    SGusau Advocate I
    Advocate I
    • Mark as New
    • Bookmark
    • Subscribe
    • Mute
    • Subscribe to RSS Feed
    • Permalink
    • Print
    • Report Inappropriate Content

    ‎12-22-2021 05:09 AM

    This is one of the most helpful submissions that not only teaches but provides instant actionable code. Thank you. The community appreciates you immensely.

    Message 30 of 36
    901 Views
    1 Kudo
    Reply
    • « Previous
      • 1
      • 2
      • 3
      • 4
    • Next »

    Power Platform

    • Overview
    • Power BI
    • Power Apps
    • Power Pages
    • Power Automate
    • Power Virtual Agents

    Browse

    • Sample apps
    • Services

    Downloads

    • Windows
    • iOS
    • Android

    Learn

    • Documentation
    • Support
    • Community
    • Give feedback
    • Blog
    • Partners

    • © 2023 Microsoft
    • Follow Power Apps
    • Privacy & cookies
    • Manage cookies
    • Terms of use
    • Trademarks
    California Consumer Privacy Act (CCPA) Opt-Out Icon Your California Privacy Choices