Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Prepping for a Fabric certification exam? Join us for a live prep session with exam experts to learn how to pass the exam. Register now.

Reply
TotunG
Resolver I
Resolver I

Getting YTD / YTG Values (Dynamic)

Hi,

 

My example data:

TotunG_3-1697622929739.png

 

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)

TotunG_0-1697622781802.png

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

TotunG_1-1697622815524.png

Manual Version (would have to be updated monthly):

TotunG_2-1697622902098.png

 

How can I make this work?

1 ACCEPTED SOLUTION
TotunG
Resolver I
Resolver I

2 REPLIES 2
bolfri
Solution Sage
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] )
)




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




TotunG
Resolver I
Resolver I

SOLVED: 

 

TotunG_0-1697623459321.png

 

Helpful resources

Announcements
May PBI 25 Carousel

Power BI Monthly Update - May 2025

Check out the May 2025 Power BI update to learn about new features.

Notebook Gallery Carousel1

NEW! Community Notebooks Gallery

Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.

May 2025 Monthly Update

Fabric Community Update - May 2025

Find out what's new and trending in the Fabric community.