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

Create a new column with values from another column

I have a table with a number of columns (see picture). What I want to do is create one or two new columns based on the values of Column1. I want to have the values from like rowno 1,3,5 etc in a new column, they are all dates. As you can see the rest of the data in the table are all the same so I have duplicate values except for Column1,

 

I've also added columns at the end, index, index with mod and sub index, 

 

What is the best approach to accomplish this?

 

/Magnus

 

 

pbi1.PNG

 

 

 

 

 

 

 

 

 

 

 

 

 

pbi2.PNG

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

I created a new modulo column with 2 row interval. Then I created a custom column, if modulo index is 0 then get the value from Column1 otherwise set null. Then a new custom column checking if modulo index is 1 then get from Column1. After that I filled up the values for the second column. After that I filtered out the rows with modulo index = 1 🙂 The result looks like this

pbi3.PNG

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

Hello-

 

  I am not 100% sure what you are looking for but I thought it would be a good idea for to play around with the Pivot and Unpivot columns in the transform and modeling sections.  This will likely give you the functionality you need.

 

Jared

Anonymous
Not applicable

I created a new modulo column with 2 row interval. Then I created a custom column, if modulo index is 0 then get the value from Column1 otherwise set null. Then a new custom column checking if modulo index is 1 then get from Column1. After that I filled up the values for the second column. After that I filtered out the rows with modulo index = 1 🙂 The result looks like this

pbi3.PNG

Anonymous
Not applicable

The data comes in rows set of two rows. The only stuff that differs is the values in column1. I want to have the date in one column and the text for example in another column then remove row no 2 in the set.

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.