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.
Hello All,
I have a calculation group that includes, MTD,LY and YTD. I would like the YTD calculation to show the KPI "Goal" for the whole year, but only show the measure for the dates where there is data (which is typically to the end of the previous month). Currently it repeats the latest value for the rest of the year.
I have dimensions to filter "valid dates" to remove future dates from YTD calculations and an "is budgetary" dimension to filter budgetary values. I wrote this DAX, but it does not like that the filter expression are from different tables.
CALCULATE(
TOTALYTD(
SELECTEDMEASURE()
, Dates[Date]
)
,Dates[Valid Period] = 1 || Basis[IsBudgetary] = TRUE()
)
There a way to adjust the dax to make it work with both the measure and the kpi? I've tried adding "Dates[Valid Period] = 1" to the measure, but the TOTALYTD seems to override that.
Thank you for your assistance.
Solved! Go to Solution.
Appreciate your help, but I wasn't able to get that to work. What did though was to use an IF in the measure (and not in the KPI or calculation group) like this:
IF(
min( Dates[Valid Period] ) = 0, BLANK(),
- CALCULATE(
<some aggragation here>,<some filter here>
)
)
)
Appreciate your help, but I wasn't able to get that to work. What did though was to use an IF in the measure (and not in the KPI or calculation group) like this:
IF(
min( Dates[Valid Period] ) = 0, BLANK(),
- CALCULATE(
<some aggragation here>,<some filter here>
)
)
)