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

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

Reply
Anonymous
Not applicable

Amount from today last year until yesterday current year

Hi,

if today is 28/06/2024
i want the total amount of measure Sold from 28/06/2023 UNTIL 27/06/2024. 
I have table Time and columns Date, Year, Day, Month
I have measure Sold

How i can reach this result?
Thank you so much

1 ACCEPTED SOLUTION
xifeng_L
Super User
Super User

Hi @Anonymous ,

 

You can try below measure.

 

MEASURE =
CALCULATE (
    SUM ( Table[Amount] ),
    TREATAS ( CALENDAR ( EDATE ( TODAY (), -12 ), TODAY () - 1 ), Table[Date] )
)

 

 

Did I answer your question? If yes, pls mark my post as a solution and appreciate your Kudos !

 

Thank you~

View solution in original post

3 REPLIES 3
bhanu_gautam
Super User
Super User

@Anonymous , You can achieve this using measures

 


Total Sold Last Year to Yesterday =
VAR TodayDate = TODAY()
VAR StartDate = DATE(YEAR(TodayDate) - 1, MONTH(TodayDate), DAY(TodayDate))
VAR EndDate = TodayDate - 1
RETURN
CALCULATE(
[Sold],
FILTER(
'Time',
'Time'[Date] >= StartDate && 'Time'[Date] <= EndDate
)
)




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

Proud to be a Super User!




LinkedIn






xifeng_L
Super User
Super User

Hi @Anonymous ,

 

You can try below measure.

 

MEASURE =
CALCULATE (
    SUM ( Table[Amount] ),
    TREATAS ( CALENDAR ( EDATE ( TODAY (), -12 ), TODAY () - 1 ), Table[Date] )
)

 

 

Did I answer your question? If yes, pls mark my post as a solution and appreciate your Kudos !

 

Thank you~

Anonymous
Not applicable

thank you it works!

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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