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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply

How to Separate values from single column to two different columns depending on the values.

Hello, 

Here have a table consits of column "Count Column" , "Seconds Column", "Value Column". 

 

Need to copy and paste the data from value column to the count value column and seconds value column depending on its "count" or "seconds". For seconds it should be saved in hours instead of seconds.

Below Image I show how the data should comes from the individual columns.

Yoganandhan_01_0-1708525582147.png

Thanks..!

1 ACCEPTED SOLUTION
Ahmedx
Super User
Super User

3 REPLIES 3
Ahmedx
Super User
Super User

pls try this

Screenshot_1.png

audreygerred
Super User
Super User

Hello! You can do this in Power Query by adding custom column and conditional columns. Assuming the columns you have in your data are Count Column, Seconds Column, Value Column. For custom column, create a column that will convert your Value column to Seconds Value Column (in hours) - just go ahead and let it do the math on every value, we will take care of getting the correct values into proper columns next. For the first conditional column do something along the lines of if Seconds Column equals sec return the custom column that you created to show the seconds in hours, else blank. For the next conditional column do something like if Seconds Column is blank return the value from Value Column, else blank. 

Hello audreygerred, 

 

Thanks for the reply. Instead of conditional column. Need to use DAX for the new columns. 

Could you please suggest anything upon this requirement.

 

Thanks..

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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