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

add columns vs filter in data tables

Hi,

 

I have a datatable to summerise some data for users. To get the columns with the correct format I have used the addcolumn function. This works fine for formatting, however it seems to prevent me using the filter function at the same time. Is it possible to addcoolumns and filter at the same time?

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: add columns vs filter in data tables

Hi @SamGibbs,

How do you want to apply the Filter function within your app?

Could you please share a bit more about the "at the same time" that you mentioned?

 

If you want to filter the Data table items within your app, please modify your formula within the Items property of the Data table control as below:

 

AddColumns(
Filter(ModuleAssessments,Title=VarModCode), /* <-- Modify here */
"Weighting%",Weighting&"%",
"Handout date",Text(Date_x0020_of_x0020_Handout,"[$-en-US]dd mmm yyyy"),
"Submission date",Text(Date_x0020_of_x0020_Submission,"[$-en-US]dd mmm yyyy"),
"Feedback date",Text(Date_x0020_of_x0020_Feedback_x00,"[$-en-US]dd mmm yyyy")
)

or

 

Filter(
AddColumns(
ModuleAssessments,
"Weighting%",Weighting&"%",
"Handout date",Text(Date_x0020_of_x0020_Handout,"[$-en-US]dd mmm yyyy"),
"Submission date",Text(Date_x0020_of_x0020_Submission,"[$-en-US]dd mmm yyyy"),
"Feedback date",Text(Date_x0020_of_x0020_Feedback_x00,"[$-en-US]dd mmm yyyy")
),
Title=VarModCode
)

More details about the Filter function within PowerApps, please check the following article:

Filter function

 

Best regards,

Kris

 

Community Support Team _ Kris Dai
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

4 REPLIES 4
Power Apps Staff LanceDelano
Power Apps Staff

Re: add columns vs filter in data tables

What does your expression look like?

SamGibbs
Level: Powered On

Re: add columns vs filter in data tables

The current dataTable.Items is :

AddColumns(ModuleAssessments,"Weighting%",Weighting&"%","Handout date",Text(Date_x0020_of_x0020_Handout,"[$-en-US]dd mmm yyyy"),"Submission date",Text(Date_x0020_of_x0020_Submission,"[$-en-US]dd mmm yyyy"),"Feedback date",Text(Date_x0020_of_x0020_Feedback_x00,"[$-en-US]dd mmm yyyy"))

 

I have tried to add Filter as well but I can't seem to get it to work (I am using a variable to filter by). By itself this filter works:

Filter(ModuleAssessments,Title=VarModCode)

 

Any suggestions would be gratefully received.

Community Support Team
Community Support Team

Re: add columns vs filter in data tables

Hi @SamGibbs,

How do you want to apply the Filter function within your app?

Could you please share a bit more about the "at the same time" that you mentioned?

 

If you want to filter the Data table items within your app, please modify your formula within the Items property of the Data table control as below:

 

AddColumns(
Filter(ModuleAssessments,Title=VarModCode), /* <-- Modify here */
"Weighting%",Weighting&"%",
"Handout date",Text(Date_x0020_of_x0020_Handout,"[$-en-US]dd mmm yyyy"),
"Submission date",Text(Date_x0020_of_x0020_Submission,"[$-en-US]dd mmm yyyy"),
"Feedback date",Text(Date_x0020_of_x0020_Feedback_x00,"[$-en-US]dd mmm yyyy")
)

or

 

Filter(
AddColumns(
ModuleAssessments,
"Weighting%",Weighting&"%",
"Handout date",Text(Date_x0020_of_x0020_Handout,"[$-en-US]dd mmm yyyy"),
"Submission date",Text(Date_x0020_of_x0020_Submission,"[$-en-US]dd mmm yyyy"),
"Feedback date",Text(Date_x0020_of_x0020_Feedback_x00,"[$-en-US]dd mmm yyyy")
),
Title=VarModCode
)

More details about the Filter function within PowerApps, please check the following article:

Filter function

 

Best regards,

Kris

 

Community Support Team _ Kris Dai
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

SamGibbs
Level: Powered On

Re: add columns vs filter in data tables

Hi,

 

Thanks for that- I had the syntax wrong!

Helpful resources

Announcements
Better Together’ Contest Finalists Announced!

'Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

thirdimage

Power Apps Community User Group Member Badge

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

sixthImage

Join THE global Microsoft Power Platform event series

Attend for two days of expert-led learning and innovation on topics like AI and Analytics, powered by Dynamic Communities

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

thirdimage

Community Summit North America

Innovate, Collaborate, Grow - The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors
Users online (9,269)