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

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

Welcome to the User Group Public Preview

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

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Power Apps June 2021

June Power Apps Community Call

Did you miss the call? Check out the recording here!

Top Solution Authors
Top Kudoed Authors
Users online (17,221)