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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Anonymous
Not applicable

Total YTD does not work

I have a table which I use to override a SUM measurement. This works fine in overriding the Sum measurement. However when I apply DATESYTD function on this measurement, I get incorrect results. My model is setup correctly to support time-intelligence functions. For 2020 which does not have a manual override value, the DATESYTD function is working fine. Below is the Dax with my results. It is required that I have YTD value. I also tried TOTALYTD function and got the same results. Any ideas to make this work?

 

#New Term Policy Override = Sum(NewTermOverride[NewTermCount])

#New Term Policy Prelim = SUM('Fact_Policy'[NewTermCount])

#New Term Policy = If (Isblank('Fact_Actual'[#New Term Policy Override]),'Fact_Actual'[#New Term Policy Prelim],'Fact_Actual'[#New Term Policy Override]) This formula is getting the correct value.

#New Term Policy YTD = CALCULATE([#New Term Policy],DATESYTD('Calendar'[Date])) This formula is getting the incorrect value.

  

Results.png

 

 
 
5 REPLIES 5
harshnathani
Community Champion
Community Champion

Hi @Anonymous ,

 
Let me know if this works
 
Measure = CALCULATE (
    [#New Term Policy],
    FILTER (
        ALL ( Calendar ),
        'Calendar'[Date]
            <= MAX ( 'Calendar'[Date] )
            && YEAR ( 'Calendar'[Date] )
                YEAR (
                    MAX ( 'Calendar'[Date] )
                )
    )
)
 

Regards,
Harsh Nathani

Did I answer your question? Mark my post as a solution! Appreciate with a Kudos!! (Click the Thumbs Up Button)

Anonymous
Not applicable

Thanks for the suggestion. I got the same result. It is not working.

Any other ideas?

@Anonymous ,

 

What i understand from your visual is taht Report Date is not part of the Date Table.

 

You need to pull the Date from the Date table in the visualization.

 

Regards,

HN

 

Can you share your model and some sample date in text format.

Anonymous
Not applicable

It appears what is happening is Power BI is not letting 2 different Date relationship from 2 seperate table to exist in one YTD calculation.

 

Does that make sense?

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

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.