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

Data Days is here! Join us now for 60+ days of learning, challenges, and connection. Learn more

Reply
Anonymous
Not applicable

YTD QTD MTD doesn't work

I am playing around with the provided tutorial example, "financial", and tried to learn different functions. I didn't modify any data they provided, but only added a DateTime table and connected it with the "financial" table.

 

I am using TOTALYTD, TOTALQTD, TOTALMTD these three functions to see the running total throughout the period (9/2013 - 12/2014). I have watched several tutorials about how to do so and followed the idea, but I failed to get the answer.

 

I tried to use "Quick Measure", but seems that I didn't type anything wrong as "Quick Measure" provided an exactly answer as I did. 

 

Profit MTD = 
    TOTALMTD(SUM(financials[Profit]), 'Calendar'[Date].[Date])
Profit QTD = 
    TOTALQTD(SUM(financials[Profit]), 'Calendar'[Date].[Date])
Profit YTD = 
    TOTALYTD(SUM(financials[Profit]), 'Calendar'[Date].[Date])

 

Here is the picture that I see. Clearly, there are a butch of empty cells under the measures.

hyman9090_0-1672850219192.png

 

I would also like to provide the DateTime table that I created and the relationship between tables.

 

Calendar = 
    ADDCOLUMNS(
        CALENDAR(MIN(financials[Date]),MAX(financials[Date])),
        "Year", YEAR([Date]),
        "Month", MONTH([Date]),
        "Day", DAY([Date]),
        "Date Integar", FORMAT([Date], "YYYYMM"),
        "Date Integar 2", FORMAT([Date], "YYYY-MM"),
        "Month Number", FORMAT([Date], "MM"),
        "Month Name", FORMAT([Date], "MMMM"),
        "Month Short Name", FORMAT([Date], "MMM"),
        "Day Of Week Number", WEEKDAY([Date]),
        "Day of Week", FORMAT([Date], "dddd"),
        "Quarter", "Q" & FORMAT([Date], "Q")
    )

 

hyman9090_1-1672850745942.png

 

Hope someone can answer my question. Maybe it is easy, just I am not aware of where I make it wrong.

Thanks so much.

1 ACCEPTED SOLUTION
Anonymous
Not applicable

I think I got the answer accidentally. The reason I got empty cell are due to wrong data selection, I chose the "Month" from the fact table "financial", instead of choosing the "Month" from the dim table/calendar.

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

I think I got the answer accidentally. The reason I got empty cell are due to wrong data selection, I chose the "Month" from the fact table "financial", instead of choosing the "Month" from the dim table/calendar.

johnt75
Super User
Super User

Not sure if this is the problem but the time intelligence functions need to have full years to work correctly. Try using CALENDARAUTO instead of CALENDAR, or use

CALENDAR( DATE( MIN(YEAR(financials[Date])), 1, 1), DATE( MAX(YEAR(financials[Date])), 12, 31)
Anonymous
Not applicable

Thanks @johnt75, I have tried both methods and looked back to the matrix, but neither shows the result.  

Helpful resources

Announcements
Fabric Data Days is here Carousel

Fabric Data Days 2026

Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.

May Power BI Update Carousel

Power BI Monthly Update - May 2026

Check out the May 2026 Power BI update to learn about new features.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.