cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
asanch41
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:

 

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
v-micsh-msft
Community Support
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.

View solution in original post

2 REPLIES 2
v-micsh-msft
Community Support
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.

View solution in original post

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
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

PA Community Call

Power Apps Community Call

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

MBAS Carousel

Sign up for our May 4th event!

May the fourth be with you, join us online!

secondImage

Experience what’s next for Power Apps

See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Top Solution Authors
Top Kudoed Authors
Users online (21,115)