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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Sulsa
Frequent Visitor

Calculation Groups and YTD KPI Goals

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.

 

2023-12-15_8-02-42.jpg

 

Thank you for your assistance.

1 ACCEPTED 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>
                
            )
        )
    )

 

View solution in original post

2 REPLIES 2
some_bih
Super User
Super User

Hi @Sulsa search for part "ShowValueForDates " on link as idea and possible solution





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!






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>
                
            )
        )
    )

 

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.