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

Selecting row after and before

Good afternoon, guys.

 

Is it possible for me to select a row after and before a specific set of filled rows ? i wish to build up gaps in my dataset in order to extract the correct datediff from my time of work, but, my dataset is mixed and i have none to almost no reference to the correct process that the work is being done.  

 

Example: 

01/02/2020 12:1501/02/2020 12:2301/02/2020 12:2301/02/2020 11:36
01/02/2020 12:2301/02/2020 12:3301/02/2020 12:3301/02/2020 12:15
01/02/2020 12:3301/02/2020 12:4001/02/2020 12:4001/02/2020 12:23
01/02/2020 12:4301/02/2020 13:02(one more row here should be:) 01/02/2020 12:43 
01/02/2020 14:2201/02/2020 14:25  
01/02/2020 14:2601/02/2020 14:36  
01/02/2020 14:3601/02/2020 15:34 01/02/2020 14:26 (this should not be here)
01/02/2020 15:3501/02/2020 15:48  
01/02/2020 15:5001/02/2020 15:55  
01/02/2020 16:5001/02/2020 16:50  
01/02/2020 16:5101/02/2020 16:51  
01/02/2020 18:4501/02/2020 18:4501/02/2020 18:45 
01/02/2020 18:4501/02/2020 18:4601/02/2020 18:4601/02/2020 18:45
01/02/2020 18:4601/02/2020 19:2601/02/2020 19:2601/02/2020 18:45
4 REPLIES 4
v-zhenbw-msft
Community Support
Community Support

Hi @Anonymous ,

 

Sorry for that we cannot understand your requirement clearly. Do the third and fourth columns is the column need to added?  What is the logic to add those columns?

 

Does the third column copy the second column’s value? Does the fourth column copy the first column’s previous value? And why the third column and fourth column have some blank?

 

Could you please split the raw data of your sample and the expected result into two tables so that we can understand it easier?

 

Best regards,

 

Community Support Team _ zhenbw

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Anonymous
Not applicable

Another example, but with some data that should not be considered.

 

orange: should not be there

yellow: it's okay to have this sequence, because it starts with code idParada 387

 

IMAGE3.jpg

Anonymous
Not applicable

Another example:

this one is better, as you can see i have a lot of yellow rows that need to be filled, because the dtInicio of the previous row is equal to dtFim of the next row until the orange colored rows (as you can see, here the continuation ends and the cycle is broken) 

image2.jpg

Anonymous
Not applicable

Hey, i'm sorry for taking so long to answer. i Was sick the last few days and wasn't able to use the computer.

 

 

So, about the issue in hands. it's as the following image:

Everytime time the number 387 appears in the column idParada, i want the column SETUP MARK to show me dtinicio continuously (dtinicio of the previous row is equal to the dtFim from the next) as it is shown in the example. BUT, in some situations, it does not fill the rows, as you can see in the yellow ones. 

 

 

image1.jpg

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.