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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Collection as Gallery ...
Power Apps
Answered

Collection as Gallery Items.

(0) ShareShare
ReportReport
Posted on by 9

Hi,

I am newbie to Power Apps. I am working on app for which data source is Power BI report. My use case is, On Power App I wanted to users to see the data that has come from Power BI, edit if required or create a new record and write the data to share point Excel.

I am facing issue with basic things. I am adding Power BI data to Collection on App-->On start. on Gallery I am using this collection to display data by filtering based on one drop down.

When I try to use this method, my gallery is not showing any items. However when I add the Power BI data to collection at Main Screen-->On Visible its working.  I do not want to add the data set to Collection at Main screen as this will duplicate the data when I return from other screen. Any suggestions why adding collections at App-->On start is not showing gallery?

 

Here is my code.. On App start , 

ClearCollect(Itemstoshow,[@PowerBIIntegration].Data);

 

On Gallery Items: Filter(Itemstoshow,Region=RegionSel.SelectedText.Result)

Categories:
  • KrishnaV Profile Picture
    5,023 on at

    Hi @narengc ,

     

    In Power Apps you need to set the data on the screen or you should set it to a collection onStart of the App and set to a gallery in the screen. if you see any issues with the filter on the screen see the below tips or approach to get the required results:

    Filter query.png


    I hope this resolved your issue if you see any challenge/need further help please let me know I am always happy to do it for my community.

    Regards,
    Krishna
    If this post helps you give a 👍 and if it solved your issue consider Accept it as the solution to help the other members find it more.

  • narengc Profile Picture
    9 on at

    Hi Krishna,

     

    Thank you for the reply. I have set my data to collection on App start and filtering the data on my Gallery Items. For some reason this is not working I mean no data is showing on Gallery however when I set the my data to collection on Screen it is showing the data on my Gallery. Not sure what I am doing wrong.

     

    I cant load the data in to collection on Screen because when I navigate from different screens collection is duplicating my data as loading data to collection will be called. Hope I have conveyed the issue properly.

     

     

     

  • KrishnaV Profile Picture
    5,023 on at

    Hi @narengc ,

     

    Try changing the filter as below: 

    Items: Filter(Itemstoshow,Region.Value=RegionSel.SelectedText.Result)

     
    I hope this resolved your issue if you see any challenge/need further help please let me know I am always happy to do it for my community.

    Regards,
    Krishna
    If this post helps you give a 👍 and if it solved your issue consider Accept it as the solution to help the other members find it more.

  • Verified answer
    v-siky-msft Profile Picture
    Microsoft Employee on at

    Hi @narengc ,

     

    If the app.onstart property doesn't work, here is an alternative workaround. Add a condition in Screen.OnVisible property to generate the collection.

    1. Set the Screen.OnVisible:

    If(VarNum<>0, ClearCollect(Itemstoshow,[@PowerBIIntegration].Data))

     

    2. append Set(VarNum,0) code to the Navigate function in NavigateButton.OnSelect property

    Navigate(Screen2);Set(VarNum,0)

    Then the collection will only be generated once.

    Hope this helps.

    Sik

  • narengc Profile Picture
    9 on at

    Hi,

     

    This workaround has solved my problem. Just curious why on App start we cant load the data to Collectons.

    Anyways, Thanks a lot for your help.

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 232 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 202 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 122

Last 30 days Overall leaderboard