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
Anonymous
Not applicable

Time intelligence function not working?

Hello, 

 

I need a little help. I know something little wrong with my calculations, but my calculation is showing a blank or wrong number.  I have sales data with join to the date table. When I add a year as filter most of them work but they give me wrong numbers that do not make sense. Please see my attached formulars and sample files. Can anybody please tell me what I am doing wrong? I could not figure it out. 

 

Formulars 

Total Sales = SUM(Sales_Data[TotalPrice])
Sales LM = CALCULATE( [Total Sales], DATEADD(Dates[Date], -1, MONTH ) )
Sales LY = CALCULATE([Total Sales], SAMEPERIODLASTYEAR( Dates[Date] ) )
Sales LYTD = CALCULATE([Total Sales], DATESYTD(Dates[Date]) )
Sales MTD = CALCULATE([Total Sales], DATESMTD( Dates[Date] ) )
Sales QTD = CALCULATE([Total Sales], DATESQTD( Dates[Date] ) )
Sales YTD = CALCULATE( [Total Sales], DATESYTD( Dates[Date] ) )

Please see the sample file over here.

Capture.PNG

thank you so much for your time and help 

6 REPLIES 6
amitchandak
Super User
Super User

Are your dates continous? In case dates are not continuous. It might give some issues. 

 

Make sure the Date calendar is continuous or created using a calendar. Also, it marked as Date dimension in model view.

 

Appreciate your Kudos. In case, this is the solution you are looking for, mark it as the Solution. In case it does not help, please provide additional information
Thanks.

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not applicable

@amitchandak 

 

I do have a complete date set.  I have a calendar table and join to the sales table. Thank you 

DateMYTD, YTD and QTD go till today or end of the calendar date. Select a date in slicer that should give you data.

 

Appreciate your Kudos. In case, this is the solution you are looking for, mark it as the Solution. In case it does not help, please provide additional information and mark me with @
Thanks.

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not applicable

@amitchandak 

 

I did select the Year on date slicer. I don't want to put date range on my dashboard. I think time intelligence functions should work without any date selection., but when I do select the date it will give me the wrong data.  Please see the below picture.  Thank you 

Capture.PNG

 

Some formula you posted seems to have an issue. They are same

 

Sales LYTD = CALCULATE([Total Sales], DATESYTD(Dates[Date]) )
Sales YTD = CALCULATE( [Total Sales], DATESYTD( Dates[Date] ) )

use date diff there

 

 

Sales LYTD = CALCULATE([Total Sales], DATESYTD(datediff(Dates[Date]),-12,month) )
Sales YTD = CALCULATE( [Total Sales], DATESYTD( Dates[Date] ) )

 

Appreciate your Kudos. In case, this is the solution you are looking for, mark it as the Solution. In case it does not help, please provide additional information and mark me with @
Thanks.

 

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Other than the last update. You can also restrict your page by using the page-level filter on the date till today. Use relative or advance options.

 

Appreciate your Kudos. In case, this is the solution you are looking for, mark it as the Solution. In case it does not help, please provide additional information and mark me with @
Thanks.

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

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
Top Kudoed Authors