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

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

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
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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