Forum Discussion
ThisIsHalloween
2 years agoHelper I
Subtracting Two Measures Not Working
I have created two measures that calculate the YTD. Here is what the matrix looks like: The data comes from two calculated tables that has the current fiscal year data in one table and last...
- 2 years ago
I got it to work! Here is what I used for future reference:
Difference YTD = VAR PYY = TOTALYTD(SUM(PY[Net Amount]), SAMEPERIODLASTYEAR('Date'[Date]), "6-30") VAR CYY = TOTALYTD(SUM(CY[Net Amount]), 'Date'[Date],"6-30") RETURN CYY-PYY
ThisIsHalloween
2 years agoHelper I
I got it to work! Here is what I used for future reference:
Difference YTD =
VAR PYY =
TOTALYTD(SUM(PY[Net Amount]), SAMEPERIODLASTYEAR('Date'[Date]), "6-30")
VAR CYY =
TOTALYTD(SUM(CY[Net Amount]),
'Date'[Date],"6-30")
RETURN
CYY-PYYThisIsHalloween
2 years agoHelper I
Also for future reference to anyone who stumbles upon this, if you want the future months to show as blank, this worked for me:
Difference YTD =
VAR PYY =
TOTALYTD(SUM(PY[Net Amount]), SAMEPERIODLASTYEAR('Date'[Date]), "6-30")
VAR CYY =
TOTALYTD(SUM(CY[Net Amount]),
'Date'[Date],"6-30")
VAR LAST =
MAX(CY[BI Date])
RETURN
IF(SUM(CY[Net Amount])=0,"",CYY-PYY)