cancel
Showing results for
Did you mean:
Regular Visitor

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

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:

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.

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support

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

Community Support Team _ Michael Shao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
2 REPLIES 2
Community Support

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

Community Support Team _ Michael Shao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Regular Visitor

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.

Announcements

#### Power Apps Community Call

Next call is happening on April 21st at 8a PST.