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
Kaustubhhh
New Member

Filtering repetetive rows in an sql database

  • Hi all, I have one dataset with column names- "tool no", "wear offset" , "tool length", "tool life" , "time stamp". In this dataset rows are coming per second.
  • There are different tool nos who have diff offsets.
  • I wanted to keep only those rows in the dataset where for a particular tool no the tool offset changes.
  • The offset change can be from 0.3 to 0.2 to again 0.3 but I want to record all these rows whenever and whereever the offset for that tool changes.
    • Kindly guide me with this.Screenshot_20231124-022155.pngScreenshot_20231124-022440.png

      Screenshot_20231124-022557.png

        

4 REPLIES 4
j_ocean
Helper V
Helper V

Group by all columns except time stamp, aggregate by min time stamp. So if you get readings like 

 

a 0.3

b 0.3

c 0.2

d 0.2

e 0.3

 

You'll retain rows a c and e, which are the time stamps when the value changed.

Anonymous
Not applicable

To ensure correct results using GroupKind.Local, you must be sure that your values are sorted--which appears to be the case.

 

--Nate

Anonymous
Not applicable

You could group on Tool and Offset, using the GroupKind.Local parameter in the Table.Group function. It'll give you a new group for each change in Offset.

 

--Nate

Hi Nate, 

Can you please elaborate about the same as I am a beginner in Power BI.

It will great if you can write down the query for this dataset

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.