Forum Discussion

Oros's avatar
Oros
Icon for Post Prodigy rankPost Prodigy
3 years ago
Solved

Comparing Fiscal

Hello,

 

I have the following measure for Fiscal Year-to-Date (FYTD CURRENT).  It works well with my calendar table.  How do I modify this measure to get the equivalent FYTD (PREVIOUS)?  Thanks.

 

 

FYTD (CURRENT) =
VAR _currentmonthend =
    EOMONTH ( MAX ( 'CALENDAR'[Date] ), 0 )
VAR _currentmonthendinfo =
    MAX ( 'SALES TABLE'[PostingDate] )
RETURN
    IF (
        HASONEVALUE ( 'CALENDAR'[MONTH]),
        IF (
            _currentmonthend = _currentmonthendinfo,
            CALCULATE ( 'MEASURES'[SALES], DATESYTD ( 'CALENDAR'[Date], "10-31" ) )
        ),
        CALCULATE ( 'MEASURES'[SALES], DATESYTD ( 'CALENDAR'[Date], "10-31" ) )
    )

1 Reply