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

The Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.

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
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

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

Feb2025 NL Carousel

Fabric Community Update - February 2025

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