Forum Discussion
Variance between Two Years on same Date Axis using same Amount Column
- 1 year ago
getsmithed , Try using
DAX
VARI Food Revenue =
VAR CY = CALCULATE(
SUM(ConsolidatedReport[Amount]),
ConsolidatedReport[GLAccount] = "450000",
DateDim[CurrentFiscalYear] = 0,
DATESBETWEEN(DateDim[Date], DATE(2024, 12, 1), DATE(2025, 3, 31))
)
VAR LY = CALCULATE(
SUM(ConsolidatedReport[Amount]),
ConsolidatedReport[GLAccount] = "450000",
DateDim[CurrentFiscalYear] = -1,
REMOVEFILTERS(DateDim[Date].[Year]),
DATESBETWEEN(DateDim[Date], DATE(2023, 12, 1), DATE(2024, 3, 31))
)
RETURN
CY - LY
Hi getsmithed ,
As per the above DAX expression, what is the below datatypes for ConsolidatedReport[GLAccount]?
I can see there is come DAX error while comparing column with INT with TEXT values.
Variance between Two Years on same Date Axis using same Amount Column.pbix
Please let me know if you have further questions.
If this reply helped solve your problem, please consider clicking "Accept as Solution" so others can benefit too. And if you found it useful, a quick "Kudos" is always appreciated, thanks!
Best Regards,
Maruthi
LinkedIn - http://www.linkedin.com/in/maruthi-siva-prasad/
X - Maruthi Siva Prasad - (@MaruthiSP) / X