Forum Discussion

TotunG's avatar
TotunG
Resolver I
2 years ago
Solved

Getting YTD / YTG Values (Dynamic)

Hi,

 

My example data:

 

I'm trying to use the TODAY() function to dynamically calculate YTD / YTG values using various measures:

Gets the Current Month Number (so 10 for October)

Tries to Calculate the SUM of Values where month is less than or equal to 10 (curr. month)

Manual Version (would have to be updated monthly):

 

How can I make this work?

2 Replies

  • bolfri's avatar
    bolfri
    Solution Sage

    Hi,

     

    you need to use FILTER() to make this work. Like this:

    Total YTD Value =
    CALCULATE (
        SUM ( 'A - Monthly Values'[Value] ),
        FILTER ( 'A - Monthly Values', 'A - Monthly Values'[Month] < [Current Month] )
    )