cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
SamGibbs
Helper III
Helper III

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

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
LanceDelano
Power Apps
Power Apps

What does your expression look like?

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.

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

Hi,

 

Thanks for that- I had the syntax wrong!

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Solution Authors
Top Kudoed Authors
Users online (2,866)