Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.
Hi All,
I am new to Power BI and DAX, wanting to achieve below mentioned 3rd column using DAX. Any help on this highly appreciated.
Date | Population | Daily Change |
01-01-2020 | 100 | 100 (since no previous date) |
02-01-2020 | 300 | 200 (300 - 100) |
03-01-2020 | 500 | 200 (500 - 300) |
Any help woul dbe highly appreciated. Thanks!
@ashah2020 , This will give change . you can create text column on that
new colum =
var _date = maxx( filter(Table,[date] <earlier([date])),[Date])
return
[Population] - maxx( filter(Table,[date] = _date)),[Population])
// prefer this if you continuous date
new colum =
[Population] - maxx( filter(Table,[date] = earlier([date])-1),[Population])
Hi @ashah2020 ,
Incase you want a measure
Change =
VAR _prevdate =
MAXX (
FILTER (
ALL ( 'Table' ),
'Table'[Date]
< MAX ( 'Table'[Date] )
),
'Table'[Date]
)
RETURN
IF (
_prevdate
= BLANK (),
0,
SUM ( 'Table'[Population] )
- CALCULATE (
SUM ( 'Table'[Population] ),
FILTER (
ALL ( 'Table' ),
'Table'[Date] = _prevdate
)
)
)
Regards,
Harsh Nathani
Did I answer your question? Mark my post as a solution! Appreciate with a Kudos!! (Click the Thumbs Up Button)