Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
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
Solved! Go to Solution.
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 , 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
)
)
Proud to be a 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~
thank you it works!
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
14 | |
10 | |
10 | |
10 | |
9 |
User | Count |
---|---|
20 | |
13 | |
12 | |
11 | |
8 |