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
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

R2 (Green) 768 x 460px.png

Microsoft Dynamics 365 & Power Platform User Professionals

DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.

Users online (1,871)