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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
almohalhel1408
Frequent Visitor

Delta Calculation for Duplicated row dates

hello every body ...

 

i have this table with duplicate rows for date column

i want to calculate the Delta for "Deaths" only  ? like a Measure

 

plz help me guys

 

country   date                                                 status               values     previos date

Spain04/16/2020395.570224334054Recovered 04/15/2020
Spain04/16/2020395.570224334054Active18494804/15/2020
Spain04/16/2020395.570224334054Delta_Confirmed730404/15/2020
Spain04/16/2020395.570224334054Deaths1931504/15/2020
Spain04/15/2020379.948293204569Recovered 04/14/2020
Spain04/15/2020379.948293204569Active17764404/14/2020
Spain04/15/2020379.948293204569Delta_Confirmed510304/14/2020
Spain04/15/2020379.948293204569Deaths1870804/14/2020
 
1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@almohalhel1408 ,

You can try a new column like

Diff = [values] - maxx(filter(Table,[country] =earlier([country]) && [status] =earlier([status]) && [date] =earlier([date]) -1),[Value])

 

This will diff between same status

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

View solution in original post

3 REPLIES 3
Ashish_Mathur
Super User
Super User

Hi,

What's in the third column?  There is no title there.  Please show the exact expected result.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
amitchandak
Super User
Super User

@almohalhel1408 ,

You can try a new column like

Diff = [values] - maxx(filter(Table,[country] =earlier([country]) && [status] =earlier([status]) && [date] =earlier([date]) -1),[Value])

 

This will diff between same status

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

thank you sooo much it was like a magic 😙

 

can you give an explanation how the formula work

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 Solution Authors