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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

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
Super User
Super User

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
Sept PBI Carousel

Power BI Monthly Update - September 2024

Check out the September 2024 Power BI update to learn about new features.

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

Sept NL Carousel

Fabric Community Update - September 2024

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

Top Kudoed Authors