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

Join the FabCon + SQLCon recap series. Up next: Power BI, Real-Time Intelligence, IQ and AI, and Data Factory take center stage. All sessions are available on-demand after the live show. Register now

Reply
Anonymous
Not applicable

Help with Calculating Previous Day Value using a Measure

Hello, 

 

I am looking to create a measure that returns the value for a previous day, on any given selected date. 

 

I have the following Measure but this returns the previous day from the last day of the dataset. So for example, if the latest date is 19th Sept it will return on 18th Sept. However, it doesn't work for earlier days. 

 

Measure = CALCULATE([Total EOD Balance in GBP], FILTER(ALL('V3 Measure for Changes'),'V3 Measure for Changes'[rank]=max('V3 Measure for Changes'[rank])-1))
 
The rank table
soochoilondon_0-1663573181127.png

 

 

1 REPLY 1
v-jingzhang
Community Support
Community Support

Hi @Anonymous 

 

Try modifying your measure like below. 

Measure =
VAR lastRank = MAX ( 'V3 Measure for Changes'[rank] ) - 1
RETURN
    CALCULATE (
        [Total EOD Balance in GBP],
        FILTER (
            ALL ( 'V3 Measure for Changes' ),
            'V3 Measure for Changes'[rank] = lastRank
        )
    )

 

Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it.

Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

Check out the April 2026 Power BI update to learn about new features.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

FabCon and SQLCon Highlights Carousel

FabCon &SQLCon Highlights

Experience the highlights from FabCon & SQLCon, available live and on-demand starting April 14th.