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

Next up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now

Reply
PbiCeo
Helper II
Helper II

How to get values of yesterday with DAX Measure

Hello everyone,

 

I want to get values of yesterday from the table below:

DateComAmount
1/14A100
1/15A200
1/14B0
1/15B200
1/14C200
1/15C300
1/14D250
1/15D0


If today was 1/15 the values would be like below:
A: 100 B: 0 C: 200 D:250

To do that, I tried Measure and Caluculated Column below:
Column = TODAY()

Measure = CALCULATE(SUM('Sheet1'[Amount]), dateadd('Sheet1'[Column], -1, Day))


But nothing appeared on Table visual.

And also tried the below. but the output was the same as the original table data:

Column = TODAY() -1

Measure = CALCULATE(SUM('Sheet1'[Amount]), dateadd('Sheet1'[Column], 0, Day))


Any advice please?

Thanks,
Vladi

 

4 REPLIES 4
Anonymous
Not applicable

Hello @PbiCeo ,
Please try this measure

Yesterday Values =
CALCULATE ( SUM ( Yesterday[Amount] ), DATEADD ( Yesterday[Date], -1, DAY ) )
Capture.PNG
mahoneypat
Microsoft Employee
Microsoft Employee

Please try this measure expression

 

Measure = CALCULATE(SUM('Sheet1'[Amount]), 'Sheet1'[Date] = TODAY() - 1)

 

Regards,

Pat





Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about Power BI, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


themistoklis
Community Champion
Community Champion

@PbiCeo 

 

Thy the following formula in a measure.

Measure = CALCULATE(MAX('Sheet1'[Amount]), dateadd(Sheet1[Date], -1, Day))

Then create a new table and add the field 'Com' and the 'Measure'

 

image.PNG

@themistoklis ,
Thank you for your advice.
Actually, it gets values of a previous day of the newest data.
I want to get values of yesterday. For example, I open PBIX on 1/15, values should be of 1/14.
How can I do with Today function?
Thank you,

Helpful resources

Announcements
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.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

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