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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Aleiadeh
Frequent Visitor

Difference between rows and keep first row value

Greetings,

 

I am trying to add a calculated column or Measure that will return the difference of two rows of a MEASURE (Column B-A, C-B and so on) In the same time I need to keep the first row value (A) as it is.

I tried with below command for calculated cloumn but the first row was wrong I need keep the result "134,685.68" for first column then calculate the difference :

CC_Weekly_Actual_NLU =
[M_Weekly_Actual_NLU-(CALCULATE([M_Weekly_Actual_NLU],
FILTER(Actual_NLU,Actual_NLU[Index.1]=EARLIER(Actual_NLU[Index.0]))))
 
Untitled1.jpg
 

Any suggestion to modify the Calculated Column or provide a new Measure formula to provide what I want.

 

Thank you in advance

1 REPLY 1
amitchandak
Super User
Super User

@Aleiadeh , Try a new column like

Column = var _1 = maxx(FILTER('Table', 'Table'[Date] < EARLIER('Table'[Date])),LASTNONBLANKVALUE('Table'[Date],'Table'[M_Weekly_Actual_NLU]))

return [M_Weekly_Actual_NLU] -_1

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

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.