Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Hello everyone.
I try to calculate the amount of previous year with same day.
An example, we are the 03/02/2017, i want the amount between 01/01/2016 and 03/02/2016.
I try with different function :
LastYearMT = VAR
CurrentDate = NOW()
RETURN
CALCULATE(
SUM(Ventes[Montant]);
YEAR(Ventes[DATE]) = YEAR(CurrentDate)-1;MONTH(Ventes[DATE])<MONTH(CurrentDate)+1)
LastYearMT02 = VAR
CurrentPeriod = DATEDIFF(Date(Year(Now());1;1);now();DAY) RETURN
CALCULATE(
SUM(Ventes[Montant]);
DATEDIFF(Date(Year(Now());1;1);Ventes[DATE];DAY)<=CurrentPeriod)And now the result :
Have you some issues ?
Thank you so much.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 8 | |
| 6 | |
| 6 | |
| 5 | |
| 4 |
| User | Count |
|---|---|
| 25 | |
| 14 | |
| 8 | |
| 8 | |
| 8 |