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
JohnFetherolf
Frequent Visitor

Time Intelligence is not working

I cannot get the time intelligence functions to work. I've been working with Power BI for years, so I do have some experience. Here is some background/detail info:

 

I've scaled back the data model so there are only two tables: Calendar and Orders. The orders table has an Invoice date that I joined to the calendar table - which is marked as the date table.

 

Steps I've taken

  1. Added Matrix to the report with rows set to the date from the calendar table
  2. Created a measure: Sales = sum('Orders'[Net Sales])
  3. Created a measure: Rows = COUNTROWS('Calendar')
  4. Set the Values in the Matrix = Sales and the Rows

This validated that I had values for the various invoice dates - basically every Monday thru Friday. And I had a row for every day in the calendar - all 365 days for 2021

 

When I create the measure: 

YTD Sales = CALCULATE([Sales],DATESYTD('Calendar'[Full Date]))

This works - It calculates the correct value for all the sales in 2021

 

When I create the measure: 

MTD Sales = CALCULATE([Sales],DATESMTD('Calendar'[Full Date]))

It does not work; it shows (Blank) when I add it to a Card

 

I've tried other functions and none of them works for the Month calculations. I'm clueless to what to try next. I would appreciate any help

1 ACCEPTED SOLUTION
v-henryk-mstf
Community Support
Community Support

Hi @JohnFetherolf ,

 

The first thing to confirm is to check the data model to observe whether the calculated sales of the current month has a corresponding value. If the value is empty, blank will be returned. If this is not the reason, check whether the Full Date field type can count the month.

 

If it is not the above problem, can you provide test data (delete sensitive information) and more information for me to do further testing. 

If you can’t provide further test data, you can check the official documentation for the use of the DATESMTD function and similar solutions, hoping to help you.

v-henryk-mstf_0-1617090084035.png

 

 

Let me know the result immediately, looking forward to your reply.

Best Regards,
Henry

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

5 REPLIES 5
v-henryk-mstf
Community Support
Community Support

Hi @JohnFetherolf ,

 

Check if the solution provided by this link can help you solve the problem.

v-henryk-mstf_0-1617184426689.png


Let me know the result immediately, looking forward to your reply.

Best Regards,
Henry

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

I found the issue yesterday. My calendar had dates for all of 2021. When I removed the futures, the DATESMTD and TOTALMTD worked. This explains why the DATESYTD and TOTALYTD worked - the calendar did not have future years.

v-henryk-mstf
Community Support
Community Support

Hi @JohnFetherolf ,

 

The first thing to confirm is to check the data model to observe whether the calculated sales of the current month has a corresponding value. If the value is empty, blank will be returned. If this is not the reason, check whether the Full Date field type can count the month.

 

If it is not the above problem, can you provide test data (delete sensitive information) and more information for me to do further testing. 

If you can’t provide further test data, you can check the official documentation for the use of the DATESMTD function and similar solutions, hoping to help you.

v-henryk-mstf_0-1617090084035.png

 

 

Let me know the result immediately, looking forward to your reply.

Best Regards,
Henry

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

MTD Not Working.JPG

 

Here is an image the canvas. As you can see, the MTD sales is displayed as (Blank) in the Card visual. However, in the Matrix, you can see there is sales for March (the current month) and in the table, there are several rows with March 2021 dates.

lbendlin
Super User
Super User

What's the reasoning behind step #3 ?

 

What do you expect to show on the card visual?

 

Please post some sample orders data (across multiple months)

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.

Top Solution Authors