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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
Elie_HUCHET
Helper II
Helper II

Creating a formula to check each row over the previous row

 

Hello, I would like to create a formula to check the content of a line. Here I have a repeat on my file numbers.

Elie_HUCHET_1-1664872552962.png

Here the formula would be if the case number of line 1 is equal to line 2 then "do not count" else "To count".

On Excel it's pretty easy but on PowerQuery it's not.

Thank you for your help.

1 ACCEPTED SOLUTION
Greg_Deckler
Super User
Super User

@Elie_HUCHET Do you have an Index column? Do you have a problem adding an Index column? Otherwise, it is going to be next to impossible. In DAX, if you have an Index column, this type of thing is trivial, in Power Query it is more complex:

Get Value from Previous Row using Power Query - BI Gorilla

@RickdeGroot 


Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

View solution in original post

2 REPLIES 2
Greg_Deckler
Super User
Super User

@Elie_HUCHET Do you have an Index column? Do you have a problem adding an Index column? Otherwise, it is going to be next to impossible. In DAX, if you have an Index column, this type of thing is trivial, in Power Query it is more complex:

Get Value from Previous Row using Power Query - BI Gorilla

@RickdeGroot 


Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

@Greg_Deckler thank you!!! it's perfect

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.

Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.