Forum Discussion
doubi1899
2 years agoRegular Visitor
YOY calculation
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...
BeaBF
2 years agoSuper User
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
- doubi18992 years agoRegular Visitor
approved the request.
- BeaBF2 years agoSuper User
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
- doubi18992 years agoRegular Visitor
thank you so much. I realized where the mistake is.