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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
Anonymous
Not applicable

Collecting data from multiple lines to one line

Hi colleagues,

 

I would like to have your support about the topic below:

I have one table (summarized table) including multiple lines for each "Company" with different audit status.

Is it possible to combine all these line, and resume the audit status in one line for each supplier ?

Target is to move from Table 1 to Table 2:

 

CompanyAudit 1Audit 2Audit 3Audit 4
Xvalid   
X planned  
X    
X   expired
Y   expired
Yplanned   
Y planned  
  valid 
Z   expired
Z  planned 
Z valid  
Zvalid   

MarwenA_0-1635864153880.png

Thanks for your support !

Best regards.

1 ACCEPTED SOLUTION

You could use SUMMARIZE or GROUPBY on your table.

 

For example:

SUMMARIZE (
    Table1,
    Table1[Company],
    "Audit 1", MAX ( Table1[Audit 1] ),
    "Audit 2", MAX ( Table1[Audit 2] ),
    "Audit 3", MAX ( Table1[Audit 3] ),
    "Audit 4", MAX ( Table1[Audit 4] )
)

 

View solution in original post

5 REPLIES 5
sanalytics
Super User
Super User

Hi @Anonymous 

 

You can also acheive your  output through Power Query..Attached is the screenshots and Power Bi file..

sanalytics_0-1636110564495.png

 

https://dropfiles.org/p7Cp8b


have a look

 

Regards

sanalytics

v-henryk-mstf
Community Support
Community Support

Hi @Anonymous ,

 

I have done tests and think the solution provided by @AlexisOlson  works, refer to the following.

vhenrykmstf_0-1636099194929.png

If the problem is still not resolved, please point it out. Looking forward to your reply.


Best Regards,
Henry

 

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

amitchandak
Super User
Super User

@Anonymous , in power query, create a table using  group by and use min/max for all columns other than company

https://docs.microsoft.com/en-us/power-query/group-by

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not applicable

@amitchandak First, thanks for your reply. 

As my table is a result of "summarize" function, I can't use the "group by" ==> when i open power query my table isn't there.

Is there any other solution please ?

You could use SUMMARIZE or GROUPBY on your table.

 

For example:

SUMMARIZE (
    Table1,
    Table1[Company],
    "Audit 1", MAX ( Table1[Audit 1] ),
    "Audit 2", MAX ( Table1[Audit 2] ),
    "Audit 3", MAX ( Table1[Audit 3] ),
    "Audit 4", MAX ( Table1[Audit 4] )
)

 

Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.