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
Lucie_C
Frequent Visitor

Value previous year

Hello,

please, can you help me. I have simple data table and I need to add Calculated coloum Value previous year:

 

Data_table.png

 

Please, anyone does know DAX formula?

Thank you

1 ACCEPTED SOLUTION
v-piga-msft
Resident Rockstar
Resident Rockstar

Hi @Lucie_C,

 

You could create the calculated column with the formula below.

 

Column =
CALCULATE (
    MAX ( 'Table1'[Value] ),
    FILTER (
        'Table1',
        YEAR ( 'Table1'[Date] )
            = YEAR ( EARLIER ( 'Table1'[Date] ) ) - 1
            && [Company] = EARLIER ( Table1[Company] )
    )
)

Here is your desired output.

 

Capture.PNG

 

Hope this can help you!

 

Best Regards,

Cherry

Community Support Team _ Cherry Gao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

4 REPLIES 4
GDO
Regular Visitor

You could also use the formula below:

 

Coloumn = LOOKUPVALUE( Table1[Value] ; Table1[Company] ; Table1[Company] ; Table1[Date] ; SAMEPERIODLASTYEAR( Table1[Date] ) )

v-piga-msft
Resident Rockstar
Resident Rockstar

Hi @Lucie_C,

 

You could create the calculated column with the formula below.

 

Column =
CALCULATE (
    MAX ( 'Table1'[Value] ),
    FILTER (
        'Table1',
        YEAR ( 'Table1'[Date] )
            = YEAR ( EARLIER ( 'Table1'[Date] ) ) - 1
            && [Company] = EARLIER ( Table1[Company] )
    )
)

Here is your desired output.

 

Capture.PNG

 

Hope this can help you!

 

Best Regards,

Cherry

Community Support Team _ Cherry Gao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

Hello,

 

I have the same case but with a second date column called "As of date", which will be selected as a filter in the visual.

 

How can I expand the formula to include that second date?

 

Thank you!

Thank you 🙂

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!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 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.