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 / Adding a column to a C...
Power Apps
Answered

Adding a column to a Collection using a Filtering function according to the current row value.

(0) ShareShare
ReportReport
Posted on by 14

Hi everybody! I am trying to add a column to a collection using a Filtering function according to the current row value, but I don´t find a way to use that Filtering function with a dynamic condition instead of a static one.

 

For instance, my collection looks like this:

 

Screen Shot 2017-03-17 at 12.10.36 PM.png

 

I want the column "DOCUMENTOS_ÚNICOS_ACUMULADOS" (3rd column) to contain the cumulative frequency of the column "DOCUMENTOS_ÚNICOS" (2nd column) for every value in the "MES" column (4rd column). That means, that "DOCUMENTOS_ÚNICOS_ACUMULADOS" for "MES" = "Septiembre" is going to be the sum of all the "DOCUMENTOS_ÚNICOS" where the "MES_NÚMERO" is less or equal to 9. Then, "DOCUMENTOS_ÚNICOS_ACUMULADOS" for "MES" = "Octubre" is going to be the sum of all the "DOCUMENTOS_ÚNICOS" where the "MES_NÚMERO" is less or equal to 10 and so on. In that sense, "DOCUMENTOS_ÚNICOS_ACUMULADOS" for "MES" = "Septiembre" should be 39 and "DOCUMENTOS_ÚNICOS_ACUMULADOS" for "MES" = "Octubre" should be 72 (39 + 33).

 

My problem is that I don´t know how to refer the value of a particular column in the current row. I was thinking of something like this:

 

ClearCollect(Collection_2, AddColumns(Collection_1, "DOCUMENTOS_ÚNICOS_ACUMULADOS", Sum(Filter(Collection_1, MES_NÚMERO <= MES_NÚMERO value for the current row so that this number would be 9 for the first row and 10 for the second one), DOCUMENTOS_ÚNICOS)))

 

But that didn´t work.

 

Thanks in advance for any helpful comment.

 

Smiley Happy

Categories:
I have the same question (0)
  • Verified answer
    v-micsh-msft Profile Picture
    Microsoft Employee on at

    Hi @asanch41,

     

    Well, I think using the Dynamic row value is not available currently.

    As for now, in PowerApps,

    1. there is no function to return the value of the corresponding column in a specific row (record), 

    2. There is no filter Context concept in the language used here (this is not like Data Analysis Expressions (DAX)),

    For add columns, the corresponding record data could be referenced and calculated, but when data cames with the whole table, I don't think it will work.

    You may consider take use of Power BI.

    Please consider submit this as an idea if you would like PowerApps to support it.

    https://powerusers.microsoft.com/t5/PowerApps-Ideas/idb-p/PowerAppsIdeas

    Regards

     

  • asanch41 Profile Picture
    14 on at

    Hi @v-micsh-msft,

     

    Thanks for the reply. Shame PowerApps does not support that feature. I tried a lot of things but I couldn´t make it work. I am about to start using Power BI. Let's see what I can achieve with that tool.

     

    As you told me, I submitted this problem as an idea for PowerApps. I hope they find it interesting.

     

    Thanks for your time. Regards.

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

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 358 Most Valuable Professional

#2
11manish Profile Picture

11manish 214 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 185

Last 30 days Overall leaderboard