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
lscoffield
Frequent Visitor

Display only rows that differ from previous row

I have a data set that contains columns A, B, C, D, and E. In a grid, the first row will always display, the subsequent rows will display if one or more columns differ from the previous row.  Is this possible with Power BI?

 

1 ACCEPTED SOLUTION
nandic
Memorable Member
Memorable Member

@lscoffield , if you would like to delete duplicates so that only first occurence remains, you can remove duplicates in Power Query.

remove duplicates.PNG

If you need to compare row to exactly previous row then you should add several steps:
1) In power query add index column
2) Concatenate these columns in one column
3) Create calculated column using earlier or lookup to get previous row ( https://community.powerbi.com/t5/Desktop/How-to-get-previous-row-value-for-text-column/td-p/312560)
4) Filter data based on that column on report level


View solution in original post

2 REPLIES 2
edhans
Super User
Super User

Can you provide sample data (per links below) and what your expected output is? Your explanation is not clear enough for me to get started, but I am 99.9% sure this will not be too difficult. But I don't want to waste type typing in fake data that isn't relevant to your situation, or returning a result that doesn't answer your question.

 

How to get good help fast. Help us help you.
How to Get Your Question Answered Quickly
How to provide sample data in the Power BI Forum



Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!

DAX is for Analysis. Power Query is for Data Modeling


Proud to be a Super User!

MCSA: BI Reporting
nandic
Memorable Member
Memorable Member

@lscoffield , if you would like to delete duplicates so that only first occurence remains, you can remove duplicates in Power Query.

remove duplicates.PNG

If you need to compare row to exactly previous row then you should add several steps:
1) In power query add index column
2) Concatenate these columns in one column
3) Create calculated column using earlier or lookup to get previous row ( https://community.powerbi.com/t5/Desktop/How-to-get-previous-row-value-for-text-column/td-p/312560)
4) Filter data based on that column on report level


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.