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
ScripTeapot_
Frequent Visitor

How to union multiple columns in a new table

I need help to order this data in a new table; I made a mock data to exemplify how they gave me the data.

Captura de pantalla 2023-05-15 014004.png

The thing is, in january a certain amount of clients were charged for a number of day of service but they not necessarily paid in january. The same for the charged period of february and march. I need to order all the payment columns and all the dates columns into one column for each one; all the jan dates and amount first, the feb next and so on. Also, I need to identify from what month charged is. Like the next example:

Captura de pantalla 2023-05-15 014749.png

The amount of clients may differ one month from another, so a need the blank spaces to see who has not paid.

I need this data in a new table to visualize correctly.

1 ACCEPTED SOLUTION
tamerj1
Super User
Super User

Hi @ScripTeapot_ 

Better to use poerr query to unpivot these columns. The column headers will become attributes in the Attribute column and the values will be in the Value column 

View solution in original post

3 REPLIES 3
tamerj1
Super User
Super User

Hi @ScripTeapot_ 

Better to use poerr query to unpivot these columns. The column headers will become attributes in the Attribute column and the values will be in the Value column 

I already try this, but it didn't work. I try unpivot the payment columns but the dates interact in a strange way. I had a similar case a few months ago but I don't know why it does not work now.

@ScripTeapot_ 
Then split it into 3 queries each one Date and one Value column then append the 3 queries.

Helpful resources

Announcements
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 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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