cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
vmusthu786
Level: Powered On

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
Power Apps Staff CarlosFigueira
Power Apps Staff

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
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.

 

Power Apps Staff CarlosFigueira
Power Apps Staff

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

vmusthu786
Level: Powered On

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



Power Apps Staff CarlosFigueira
Power Apps Staff

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
Better Together’ Contest Finalists Announced!

'Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

thirdimage

Power Apps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Join THE global Microsoft Power Platform event series

Attend for two days of expert-led learning and innovation on topics like AI and Analytics, powered by Dynamic Communities

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

thirdimage

Microsoft Business Applications Virtual Launch

Join us for the Microsoft Business Applications Virtual Launch Event on Thursday, April 2, 2020, at 8:00 AM PST.

thirdimage

Community Summit North America

Innovate, Collaborate, Grow - The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors
Users online (9,778)