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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
goncalogeraldes
Super User
Super User

Use Year to Go (YTG) measure with Time Intelligence

I was working on an old report in the company where they initially did not use a date dimension so I created one to lighten up the file. The problem is, previously, the YTG measure used to work just fine and now, no matter how much I change it, it does not work.

 

The previous formula was just like Greg Deckler suggested in: https://community.powerbi.com/t5/Desktop/Calculate-YTG-Year-to-Go/m-p/476531 .

 

While currently it looks like this:

 

Year To Go = 

VAR __today = TODAY()
VAR __maxDate = DATE(YEAR(TODAY()),12,31)

RETURN 
    CALCULATE(
        SUM(POWERBI_V_SALES[Amount]),
        FILTER(
            Dim_Date,
            Dim_Date[Date_Key] > __today && Dim_Date[Date_Key] <= __maxDate
        )
    )

 

It just returns blank all the time... Do you have any suggestions? Thank you!

3 REPLIES 3
CNENFRNL
Community Champion
Community Champion

9 out of 10, so-called issues arise from negligence of comprehensive filter context, under which a measure evaluates. Your measure seems correct alone; but filter context matters.


Thanks to the great efforts by MS engineers to simplify syntax of DAX! Most beginners are SUCCESSFULLY MISLED to think that they could easily master DAX; but it turns out that the intricacy of the most frequently used RANKX() is still way beyond their comprehension!

DAX is simple, but NOT EASY!

PaulOlding
Solution Sage
Solution Sage

Is Dim_Date[Date_Key] a date field?

Dim_Date[Date_Key] is the column with the Dates in the date dimension that I created

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.