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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
damonkimble
Frequent Visitor

Timestamps duplicate rows - break into columns

Hello all,

I am running into a small issue where the column "TimeStamp Traveling" has two booking statuses "traveling" where I want them to have their own columns. So one column to have traveling #1 and another column traveling#2. Is this doable based on the current data? Thank you.

 

damonkimble_1-1623685488826.png

 

1 ACCEPTED SOLUTION
v-yalanwu-msft
Community Support
Community Support

Hi @damonkimble  ,  

IF you want to two different column ,may you should create two column as follows: 

Traveling#1 = var _rank=IF([TimeStamp Taveling]<>BLANK(),RANKX('Table',[TimeStamp Taveling]))
return IF(_rank=1,[TimeStamp Taveling])
Traveling#2 = 
var _rank=IF([TimeStamp Taveling]<>BLANK(),RANKX('Table',[TimeStamp Taveling]))
return IF(_rank=2,[TimeStamp Taveling])

The final output is shown below:  

vyalanwumsft_1-1623833238497.png

Best Regards,
Community Support Team_ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.   

View solution in original post

4 REPLIES 4
v-yalanwu-msft
Community Support
Community Support

Hi @damonkimble  ,  

IF you want to two different column ,may you should create two column as follows: 

Traveling#1 = var _rank=IF([TimeStamp Taveling]<>BLANK(),RANKX('Table',[TimeStamp Taveling]))
return IF(_rank=1,[TimeStamp Taveling])
Traveling#2 = 
var _rank=IF([TimeStamp Taveling]<>BLANK(),RANKX('Table',[TimeStamp Taveling]))
return IF(_rank=2,[TimeStamp Taveling])

The final output is shown below:  

vyalanwumsft_1-1623833238497.png

Best Regards,
Community Support Team_ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.   

Good Morning @v-yalanwu-msft ,

Thank you! Quick question, TimeStamp Traveling is actually a customized column where if the booking status = "Traveling" then get the timestamps. 

 

I tried creating the columns Traveling#1 and #2 but nothing is displaying. I also tried to redefine the TimeStamp Traveling column, but no result.

 

Here is the dax code for TimeStamp Traveling before modifying:

IF(bookingtimestamp[booking status]="Traveling", bookingtimestamp[timestamp])

 

 

Here is the modification I made:

TimeStamp Traveling = var _rank=IF(msdyn_bookingtimestamp[booking status]="Traveling" && [timestamptime]<> BLANK(), RANKX('msdyn_bookingtimestamp', [timestamptime]))
return IF(_rank=1,[timestamptime])
amitchandak
Super User
Super User

@damonkimble , Create a new column

Switch( true(),

not(isblank([TimeStamp Completed])) ,"Completed",

not(isblank([TimeStamp Traveling])) ,"Traveling",

"In progress"

)

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Hi @amitchandak , the code you sent is equivalent to the booking status column. What I wanted to know is there are two different timestamps for the "Traveling" booking status - where I want one column called Traveling#1 with one of the timestamp and Traveling #2 with the other timestamp instead of having in one column. Thank you either way!

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.