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

Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. 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
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.

Top Kudoed Authors