cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
asanch41
Level: Powered On

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:

 

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

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

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

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.

View solution in original post

2 REPLIES 2
Community Support Team
Community Support Team

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

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.

View solution in original post

Highlighted
asanch41
Level: Powered On

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

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.

Helpful resources

Announcements
thirdimage

Coming Soon: T-Shirt Design Contest

Keep your eyes open for our upcoming T-shirt design contest!

thirdimage

Power Apps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

Top Solution Authors
Top Kudoed Authors
Users online (6,987)