Forum Discussion

joshua1990's avatar
joshua1990
Icon for Post Prodigy rankPost Prodigy
5 years ago

Simplify and Optimize YTD Measure

Hello everyone!

We are working with a fiscal calendar in our reports.

That means that I can't use some of these awesome time intelligence functions since our fiscal months have specific start/ end dates.

Due to this "challenge", I use this approach to get the YTD Ration between sales and budget.

Ratio = 
DIVIDE (
    CALCULATE (
        [Sales],
        FILTER (
            ALL ( 'Calendar' ),
            'Calendar'[Fiscal Year]
                = MAX ( 'Calendar'[Year] )
                && 'Calendar'[Date]
                    <= MAX ( 'Calendar'[Date] )
        )
    ),
    CALCULATE (
        [Budget],
        FILTER (
            ALL ( 'Calendar' ),
            'Calendar'[Fiscal Year]
                = MAX ( 'Calendar'[Year] )
                && 'Calendar'[Date]
                    <= MAX ( 'Calendar'[Date] )
        )
    )
)

 

Do you think there is a much more efficient and elegant approach to get this ratio?

Is it useful to you some variables instead of the whole function?

Unfortunately, I get also values for the whole year (future).

How can I limit this measure just until today?

 

2 Replies