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

We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now

Reply
Anonymous
Not applicable

Split Column with multiple values in same column

Hi

 

I have a file with multiple columns, where each column can be one or more companies. Something like the following format:

 

Date              | Company1      | Company2

01-02-2019   | 1000               | 2000

01-02-2019   | 1000               | 2000

01-02-2019   | 1000               | 2000

01-02-2019   | 1000               | 2000

...... (400 rows about)

Date              | Company 1    | Company 4

01-02-2018   | 1000               | 2000

01-02-2018   | 1000               | 2000

01-02-2018   | 1000               | 2000

01-02-2018   | 1000               | 2000

 

I need to unpivot this, to something like this:

Date              |  Company       |  Amount

01-02-2018   | Company1      | 1000

01-02-2018   | Company2      | 2000

01-02-2018   | Company3      | 2000

01-02-2018   | Company4      | 2000

.....

How can I achieve this? Is there any way?

 

BTW, This is an example of the file:

https://www.spensiones.cl/apps/valoresCuotaFondo/vcfAFPxls.php?aaaaini=2002&aaaafin=2019&tf=A&feccon...

 

Thanks!

6 REPLIES 6
Anonymous
Not applicable

@Anonymous 

Right click on the date column and select Unpivot Other Columns.

 

---
Please hit the "Accept as Solution" button if my post answered your question! If my post was helpful please consider giving it a "Thumbs Up."

Anonymous
Not applicable

Hi

 

Didn't work because doing that I've lost the relation between the companies and the amounts.

 

😞

 

Thanks

Anonymous
Not applicable

I guess I'm unclear what you mean by the "relation between the companies and the amounts"

 

You started with something like this, correct?:

Annotation 2019-12-11 135444.png

 

And you should have ended up with something like this:

Annotation 2019-12-11 135506.png

 

What do you need that this does not have?

Anonymous
Not applicable

 

The difference is that in one Column the file can have more than one Company, like these:

Sin título.png

Anonymous
Not applicable

@Anonymous 

You will have to duplicate the query and then use Remove Rows and Use First Row as Headers to transform the table into multiple queries containing one table of data each:

Annotation 2019-12-12 104703.png

Annotation 2019-12-12 104830.png

Annotation 2019-12-12 104958.png

Then add a column to each query so that the columns match across queries. Use add custom column with a value of = null

Annotation 2019-12-12 105417.png

Once the columsn in all your queries match up, append the queries as new to put them all together:

Annotation 2019-12-12 110509.png

Now right click on the date and select unpivot other columns:

Annotation 2019-12-12 110614.png

Anonymous
Not applicable

Thanks.

 

That will work for one file.. But is there any way I can automate this? The file is updated daily and it's a lot of work to update it daily. I'll need to check columns and positions every day.. There must be an easier way.. I hope!

 

Thanks

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

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.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.