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

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount 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
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 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.