cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Frequent Visitor

how to add column by criteria in Datatable

Hi,

Have some list and the date of that meeting in next column. please refer the pic and i want result in DataTable as shown in picture. Individually (by using a dropdown )i was manged to get the result by using Concat formula but need to have same in datatable (title column are only few example there more than 100 unique line items in the list). any help appreciated. Thanks 

Crop.png

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Power Apps
Power Apps

Re: how to add column by criteria in Datatable

You can use the GroupBy function to group the original table into the meeting type, then use the AddColumns function to add a new column with the dates joined by the Concat function, like in the example below:

AddColumns(
    GroupBy(
        Table,
        "Title",
        "ByTitle"),
    "Dates",
    Concat(ByTitle, Text(Date, "dd/mm/yyyy"), ", "))

The attached app shows an example of this scenario. To open it, save it locally, then go to https://create.powerapps.com, select Open -> Browse, then find the file that you saved before.

Hope this helps!

View solution in original post

4 REPLIES 4
Highlighted
Super User
Super User

Re: how to add column by criteria in Datatable

Hi @vmusthu786 

If you set the Items property of datatable to something like this, it should give you the result that you're looking for.

 

AddColumns(GroupBy(YourTable, "Title", "Details"),
"CombinedDates",
Concat(Details,Date & ",")
)

This formula calls the AddColumns function to add a column called CombinedDates. CombinedDates will Concat the date values in YourTable.

 

Highlighted
Power Apps
Power Apps

Re: how to add column by criteria in Datatable

You can use the GroupBy function to group the original table into the meeting type, then use the AddColumns function to add a new column with the dates joined by the Concat function, like in the example below:

AddColumns(
    GroupBy(
        Table,
        "Title",
        "ByTitle"),
    "Dates",
    Concat(ByTitle, Text(Date, "dd/mm/yyyy"), ", "))

The attached app shows an example of this scenario. To open it, save it locally, then go to https://create.powerapps.com, select Open -> Browse, then find the file that you saved before.

Hope this helps!

View solution in original post

Highlighted
Frequent Visitor

Re: how to add column by criteria in Datatable


@CarlosFigueira wrote:

You can use the GroupBy function to group the original table into the meeting type, then use the AddColumns function to add a new column with the dates joined by the Concat function, like in the example below:

AddColumns(
    GroupBy(
        Table,
        "Title",
        "ByTitle"),
    "Dates",
    Concat(ByTitle, Text(Date, "dd/mm/yyyy"), ", "))

The attached app shows an example of this scenario. To open it, save it locally, then go to https://create.powerapps.com, select Open -> Browse, then find the file that you saved before.

Hope this helps!


Hi,

Thanks for the reply, i tried with your suggestion with this code all the dates are coming to Column irrespective of the meeting line item. request you to suggest me with some other solution for this. I'm totally new to this. Hope you understood my requirement



Highlighted
Power Apps
Power Apps

Re: how to add column by criteria in Datatable

Can you provide more information on your issue? Which expressions you are using for the data table? If you add a data table that points directly to your Excel table, does it show the data that you expect? What do you mean by "all the dates are coming to Column irrespective of the meeting line item" - can you show what you get? Thanks!

Helpful resources

Announcements
secondImage

Demo-Extravaganza 2020

Check out these cool Power Apps & vote on your favorite!

secondImage

Community Highlights

Check out whats happening in Power Apps

secondImage

Community User Group Member Badges

FIll out a quick form to claim your community user group member badge today!

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (8,776)