cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
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
PowerApps Staff LanceDelano
PowerApps 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
firstImage

Microsoft Business Applications Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

Top Kudoed Authors
Users Online
Currently online: 273 members 5,262 guests
Please welcome our newest community members: