This is DAX formula in Power BI that should create new measure in a table but I faced error saying
DAX don't support comparing values of type integer with values type of text...
This formula is designed to calculated Sum of the Offers for the previous year vs selected one. Offer[Year] is decimal field used in the formula is decimal type:
Offer Amount Prev Year = IF(HASONEVALUE(Offer[Year]), CALCULATE(SUM(Offer[Offer Amount]), Offer[Year] = FORMAT(VALUES(Offer[Year]) - 1, BLANK())))
How to solve the error from above?