Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
hazwoper
Frequent Visitor

Help Transforming this Audit Inspection Data

The data is in this format (shortened for simplicity, but there are 20+ questions/corrections and additional identifying columns):

ManagerDateRegion Site NameQuestion 1CorrectionQuestion 2CorrectionQuestion 3Correction
John Smith1/15/2023WestABC FacilityNoFix XYZYes NoCall Locksmith
George Foreman1/23/2023Southeast123 PlantYes NoFix SignageYes 

 

The response for each question is Yes or No. If No is selected, a correction is filled out. (For example: Is the fire extinguisher working? If no is selected, the correction next to the question would be "Fix fire extinguiser") If Yes, Correction is left blank. 

 

I need to transform the above data to the following format in preparation for a Power Automate import to a SharePoint list:  

Site NameCorrectionDateRegionManager
ABC FacilityFix XYZ1/15/2023WestJohn Smith
ABC FacilityCall Locksmith1/15/2023WestJohn Smith
123 PlantFix Signage1/23/2023SoutheastGeorge Foreman

 

If there is a correction, then it needs to extracted into its own row accompanied by the identfiying columns (site name, date, etc.)

 

I tried a column to row transformation and pivoting the Correction columns but I can't get it to look the way I want. Any ideas? Thank you!

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @hazwoper ,

 

You could try unpivotting columns.

Select the following columns, and then click "Unpivot Other Columns".

vstephenmsft_0-1677573355798.png

vstephenmsft_1-1677573805966.png

Filter out "Yes", "No" and blank.

vstephenmsft_2-1677573820821.png

vstephenmsft_3-1677573852979.png

Remove the Attribute column and below is your expexted result.

vstephenmsft_4-1677573879032.png

 

 

 

Best Regards,

Stephen Tao

 

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

1 REPLY 1
Anonymous
Not applicable

Hi @hazwoper ,

 

You could try unpivotting columns.

Select the following columns, and then click "Unpivot Other Columns".

vstephenmsft_0-1677573355798.png

vstephenmsft_1-1677573805966.png

Filter out "Yes", "No" and blank.

vstephenmsft_2-1677573820821.png

vstephenmsft_3-1677573852979.png

Remove the Attribute column and below is your expexted result.

vstephenmsft_4-1677573879032.png

 

 

 

Best Regards,

Stephen Tao

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.           

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Fabric Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.