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

Track changes in Rows, post a value when occurs

Hi, 

 

I want to track when a new Variant is being registered/produced in my dataset in the column changeover

 

My table looks similar to this

 

IDVARIANTChangeover
1A 
2A1
3A1
4B0
5B1
6B1
7C0

 

 

Basically everytime that the previous row is not matching the next row, post changeover or 1 or 0 (W/E)

 

Blue equals desired state and is what i want to achieve

 

Hope someone can help

 

BR

Kristian

 

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

I solved it like this

 

Match =
VAR __prevRow = CALCULATE( MAX( 'Table'[ID] ) ) - 1
VAR __PrevRowValue = CALCULATE( MAX( 'Table'[VAR] ), 'Table'[ID] = __prevRow )
VAR __currRowValue = CALCULATE( MAX( 'Table'[VAR] ) )
RETURN
IF( __currRowValue = __PrevRowValue, 0, 1 )

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

@amitchandak Thanks for your reply,

 

I dont know if im doing it wrong but i get this result

 

krelz9210_0-1637831042848.png

 

amitchandak
Super User
Super User

@Anonymous , Create a new column like

 

new column =
var _max= Maxx(filter(Table, [ID] = earlier([ID])-1 ), [VARIANT])
return
if(_max =[VARIANT] ,1,0)

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not applicable

I solved it like this

 

Match =
VAR __prevRow = CALCULATE( MAX( 'Table'[ID] ) ) - 1
VAR __PrevRowValue = CALCULATE( MAX( 'Table'[VAR] ), 'Table'[ID] = __prevRow )
VAR __currRowValue = CALCULATE( MAX( 'Table'[VAR] ) )
RETURN
IF( __currRowValue = __PrevRowValue, 0, 1 )

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.