Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
For first column I use following code to calculate the total revenue of crruent month. It did work.
"Current = TOTALMTD([total revenue],'IOSalesRecordbyCustomer'[Date])"
And second column I want to calculate the total revenue of same month of last year. By the way , I already create a datesheet by using "Dates = CALENDAR("2022/01/01", "2024/06/01")"
Following is the code of the YOY
"YOY = CALCULATE(sum(IOSalesRecordbyCustomer[Total Revenue]),PARALLELPERIOD('Dates'[Date],-1,MONTH))"
It failed and not sure why shows the same number ( the exact number - the total revenue of current month)
https://drive.google.com/file/d/10wx09SN3fd5oceYe4PvKxadHZCsITUw4/view?usp=drive_link
Solved! Go to Solution.
@doubi1899 I think I've identified the problem.
1. Relate the Dates table to the Fact table via a many-to-one relationship, like this:
2. Then Use Date field of Dates Table in the matrix, not the field of the fact table.
Your measure will work.
BBF
@doubi1899 Hi! I'va sent you the request to access the file.
Meanwhile, try with these formulas:
Current = TOTALMTD([Total Revenue], 'Dates'[Date])
YoY = CALCULATE(
SUM(IOSalesRecordbyCustomer[Total Revenue]),
SAMEPERIODLASTYEAR('Dates'[Date])
)
YoYComparison = [CurrentMonthRevenue] - [YoY]
BBF
approved the request.
@doubi1899 I think I've identified the problem.
1. Relate the Dates table to the Fact table via a many-to-one relationship, like this:
2. Then Use Date field of Dates Table in the matrix, not the field of the fact table.
Your measure will work.
BBF
thank you so much. I realized where the mistake is.
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
| User | Count |
|---|---|
| 11 | |
| 9 | |
| 9 | |
| 5 | |
| 4 |
| User | Count |
|---|---|
| 27 | |
| 22 | |
| 20 | |
| 17 | |
| 12 |