web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / SharePoint rows into c...
Power Apps
Answered

SharePoint rows into column

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hi All,

 

I have a business requirement to SharePoint column data divided into multiple rows by project.

Example: 

Project NameIT LeadDateText column
ABCDABCD ABCD
XYZXYZ  

 

Now based on the above data i want to create a collection that displays data in the below format.
severity is assigned as per column. So for date if it is blank severity 3 will be provided and if text column is blank then severity should be 5.

Project NameIT LeadColumnSeverity
ABCDABCDDate is blank3
XYZXYZdate is blank3
XYZXYZText is blank5

 

How can I accomplish this?

 

Thanks in advance!

Categories:
I have the same question (0)
  • eka24 Profile Picture
    20,925 on at

    If you are using a Gallery for example, on the Items property:

    AddColumns(Products,"Severity",If(TextColumn="",5,If(Dates="",3)))

    ------------

    If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    @eka24 i would want to create a collection with 
    Project Name , IT Lead , Column comments , severity.

    So specifically, Under column comments it can be date column is empty and its severity. So the severity depends on column comments. 
    if the project record includes 10 columns for like date,text etc. , it needs to check for all the columns and create a report like below. I Hope i am making sense?
    Final output of collection needs to be 

    Project NameIT LeadColumn commentsSeverity
    ABCDABCDDate is blank3 (fixed and defined for date)
    XYZ XYZdate is blank3
    XYZXYZText is blank5 ( fixed and defined for text column)
  • eka24 Profile Picture
    20,925 on at

    Under the Column Comments, is "Date is Blank" and "Text is Blank" automatically inserted in your table?

    Am asking the question based on:

    "if the project record includes 10 columns for like date,text etc. , it needs to check for all the columns and create a report like below"

    ------------

    If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

    ------------

    If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    @eka24 there will be if criteria for each column. 
    Example: if date is blank then Column comments = "Date is blank"

    if text is blank then column comments  = "Text is blank"

    So the collection will contain 10 different rows for 10 different columns for a single project.
    is this doable?

  • eka24 Profile Picture
    20,925 on at

    I think you need to Show a sample table of the supposed 10 columns and also show the Output to make it clearer.

    The table you have shown does not make it explanatory enough

    ------------

    If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    @eka24 So the input will be like below which is stored on a SharePoint list.

    Project NameUnitFunctionThemeStart DateEnd DateA Start DateA End DateStageStatus
    Test ProjectIT Social10/12/202011/12/2020  Started 

    The output for the above input from SharePoint List should be:

    Project NameIT LeadColumn Commentsseverity
    Test ProjectXYZFunction is blank2
    Test ProjectXYZA start date is blank5
    Test ProjectXYZA end date is blank5
    Test ProjectXYZStatus is blank5

    I hope this clarifies my requirement?

  • eka24 Profile Picture
    20,925 on at

    Create a collection using this:

    ClearCollect(
     ProjectCol,
     AddColumns(
     ProjectTable,
     "CommentColumn",
     If(
     Function = "",
     "Function is blank",
     If(
     StartDate = "",
     "StartDate is blank",
     If(
     EndDate = "",
     "EndDate is blank",
     If(
     Status = "",
     "Status is blank"
     )
     )
     )
     ),
     "Severity",
     If(
     Function = "",
     2,
     If(
     StartDate = "",
     3,
     If(
     EndDate = "",
     "5",
     If(
     Status = "",
     "5"
     )
     )
     )
     )
     )
    )

    ------------

    If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    @eka24 This creates a record with 2 columns, however I need a collection with records for each column. 
    Current output is addition of 2 columns, column comments and Severity however I would want rows to be added for each column check as an individual record for a project in the collection along with severity of that column.

  • Verified answer
    v-bofeng-msft Profile Picture
    Microsoft Employee on at

    Hi @Anonymous :

    I assume there is a table:

    ClearCollect(
     MyTestTabel,
     {
     'Project Name': "ABCD",
     'IT Lead': "ABCD",
     Date: Blank(),
     'Text column': "ABCD"
     },
     {
     'Project Name': "XYZ",
     'IT Lead': "XYZ",
     Date: Blank(),
     'Text column': Blank()
     }
    )

    Please add a button and set it's OnSelect property to:

    Clear(Result);
    ForAll(MyTestTabel,
     If(IsBlank(Date)&&IsBlank('Text column'),
     Collect(Result,{'Project Name':'Project Name','IT Lead':'IT Lead',Column:"Date is blank",Severity:3},{'Project Name':'Project Name','IT Lead':'IT Lead',Column:"Text is blank",Severity:5}),
     IsBlank(Date),
     Collect(Result,{'Project Name':'Project Name','IT Lead':'IT Lead',Column:"Date is blank",Severity:3}),
     IsBlank('Text column'),
     Collect(Result,{'Project Name':'Project Name','IT Lead':'IT Lead',Column:"Text is blank",Severity:5})
     )
    )

    /*Result is my custom collection to save the result*/

    50.gif

    Best Regards,

    Bof

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    @v-bofeng-msft i have completed this requirement through multiple if condition and Patch method that patches the record to a collection and thus i am using that collection to view the data.

    Thanks for your input.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Vish WR Profile Picture

Vish WR 893

#2
Valantis Profile Picture

Valantis 571

#3
11manish Profile Picture

11manish 482

Last 30 days Overall leaderboard