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 / Missing/disappearing d...
Power Apps
Answered

Missing/disappearing data when adding to a collection

(0) ShareShare
ReportReport
Posted on by 13

Hi all,

 

When pulling monthly data from dataverse I get the correct information using a simple filter:

 

ClearCollect(
        RevenueItems,
        Filter(
                SelectedJob.Revenues,
                ac_year = Value(DateSelector.SelectedText.Value)
        )
);

 

The data in RevenueItems looks like this:

 

SimonBoxharry_0-1681987658626.png

 

I then try to loop through the results to add any missing months, each new month being a new item in the collection:

 

ForAll(Filter(Loop,i<=4),

        // if month number doesn't already exist in the revenue collection
        If(CountIf(RevenueItems, ac_month = i + 1) = 0,

 

                // add a new revenue month to the collection
                Collect(RevenueItems, {ac_month: i + 1, ac_grossrevenue: 0, ac_netrevenue: 0, chance: 0})
        )
);

 

Unfortunately, although the new items are added the original data seems to be lost:

 

Screenshot 2023-04-20 115531.png

 

I've tried many things to make this as simple as possible, but the problem always arises when I try to manipulate the collection after I've gathered the data.

 

Does anyone know what's going on?

Categories:
I have the same question (0)
  • Verified answer
    SimonBoxharry Profile Picture
    13 on at

    I've resolved this issue, thanks to a post on powercommunity.com - https://www.powercommunity.com/data-in-collections-not-appearing-in-power-apps/.

     

    The upcoming feature Explicit column selection prevents unused data being loaded, which I assume is a condition I met by trying to put the data into a collection. Unfortunately the use of the ShowColumns function as mentioned in the above post didn't work, so I disabled the feature:

     

    SimonBoxharry_0-1682006099204.png

     

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Vish WR Profile Picture

Vish WR 610

#2
Haque Profile Picture

Haque 317

#3
WarrenBelz Profile Picture

WarrenBelz 315 Most Valuable Professional

Last 30 days Overall leaderboard