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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
ashah2020
Regular Visitor

Custom column / measure to find today's change

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.

 

DatePopulationDaily Change
01-01-2020100100 (since no previous date)
02-01-2020300200 (300 - 100)
03-01-2020500200 (500 - 300)

 

Any help woul dbe highly appreciated. Thanks!

2 REPLIES 2
amitchandak
Super User
Super User

@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])

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

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
                )
            )
    )

 

1.jpg

 

Regards,
Harsh Nathani

Did I answer your question? Mark my post as a solution! Appreciate with a Kudos!! (Click the Thumbs Up Button)

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.