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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
Hussain_R
Frequent Visitor

[Help] How to convert a list values to row values

Hello, I have a query that comes from our ERP putting out recievables report showing the bill reference, bill date, bill value and the customer name. However, the report comes out as below: Column 1 Column 2 BillF 01/01/2024 BillF HDM24001 BillF ABC Corp BillV 234.70 I want to change this structure to show this information as rows, however I'm unable to pivot, because the first 3 values in column1 isn't different, so it throws an error. This list continues to another 6200 rows where the information for each bill is presented vertically in columns and I want them in rows. Any idea how do I go about correcting the orientation?
1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Hussain_R , Please paste the data in table format. Not able to understand the same

Based on what I got

Assume the current format is

Column 1 Column 2
BillF 1/1/2024
BillF HDM24001
BillF ABC Corp
BillV 234.7
... ...

 

Expected is

Bill Date Bill Reference Customer Name Bill Value
1/1/2024 HDM24001 ABC Corp 234.7
... ... ...

...

 

 

Add an index column from 0

 

Add another column, divide by 4, Group Index

= Table.AddColumn(#"Previous Step", "Group Index", each Number.IntegerDivide([Index], 4))

 

Pivot the Table with the do not Aggregate option  in Advance and try

 

 

If this does not help
Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.

View solution in original post

1 REPLY 1
amitchandak
Super User
Super User

@Hussain_R , Please paste the data in table format. Not able to understand the same

Based on what I got

Assume the current format is

Column 1 Column 2
BillF 1/1/2024
BillF HDM24001
BillF ABC Corp
BillV 234.7
... ...

 

Expected is

Bill Date Bill Reference Customer Name Bill Value
1/1/2024 HDM24001 ABC Corp 234.7
... ... ...

...

 

 

Add an index column from 0

 

Add another column, divide by 4, Group Index

= Table.AddColumn(#"Previous Step", "Group Index", each Number.IntegerDivide([Index], 4))

 

Pivot the Table with the do not Aggregate option  in Advance and try

 

 

If this does not help
Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.