Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
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!
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! |
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
User | Count |
---|---|
14 | |
10 | |
7 | |
6 | |
5 |
User | Count |
---|---|
30 | |
19 | |
12 | |
7 | |
5 |