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

Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!

Reply
damit23183
Microsoft Employee
Microsoft Employee

Time Intelligence Calculation Not working

Hi,

 

I have two tables One Fact table and one date table which are mapped based on DATE columns from both tables.

 

I am trying to calculate Count ID from Fact Table for TOTALYTD, TOTALQTD, TOTALMTD with respect to Date column from DATE table but its not working.

 

The formula I am using is: TOTALYTD(DISTINCTCOUNT(ID), DATE[DATE]) - Its not working giving me NUL value

 

However if i use the date column from Fact Table  its working,

 

TOTALYTD(DISTINCTCOUNT(ID), FACTTABLE[DATE]) - This is working.

 

Why its not working when I use DATE[DATE]?

 

The relationship betweeen two tables is One (Date) to Many (Fact) with BOTH CROSS FILTER DIRECTION.

 

Any suggestion?

 

Thanks

1 ACCEPTED SOLUTION

hi  @damit23183 

When you create visual, you need to use all the "date" field from DATE table, do not use any "date" field from fact table.

https://radacad.com/do-you-need-a-date-dimension

 

if you still have the problem, please share your sample pbix file, that will be a great help.

 

Regards,

Lin

Community Support Team _ Lin
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
amitchandak
Super User
Super User

@damit23183 , There can be a few reasons.  Make sure you use a date table that marked as Date.

Now when the page does not have a date filter/slicer. From where these time intelligence function will take the end date(these are end date function, there few which takes start date).

That is the last date of date passed FACTTABLE[DATE] or DATE[DATE]

 

In this case end date will be the end date or calendar (Date) or end date of the table (Facttable).

 

Make sure you use date slicer or stop your calendar till today

 

refer

Power BI — Year on Year with or Without Time Intelligence
https://medium.com/@amitchandak.1978/power-bi-ytd-questions-time-intelligence-1-5-e3174b39f38a
Power BI — Qtr on Qtr with or Without Time Intelligence
https://medium.com/@amitchandak.1978/power-bi-qtd-questions-time-intelligence-2-5-d842063da839
Power BI — Month on Month with or Without Time Intelligence
https://medium.com/@amitchandak.1978/power-bi-mtd-questions-time-intelligence-3-5-64b0b4a4090e
Power BI — WTD
https://medium.com/@amitchandak.1978/power-bi-wtd-questions-time-intelligence-4-5-98c30fab69d3
https://community.powerbi.com/t5/Community-Blog/Week-Is-Not-So-Weak-WTD-Last-WTD-and-This-Week-vs-La...
Power BI — Day Intelligence
https://medium.com/@amitchandak.1978/power-bi-day-intelligence-questions-time-intelligence-5-5-5c324...

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

Hi Amit,

 

I went through your all articles and used with and without Time Intelligence logic but did not work with DATE table.

 

My question is: Is that Ok if I use date from Fact Table while creating any measures and then apply slicer from DATE table.

 

Just wondering what is difference between using date column from Fact Table and Date Table in measures.

 

Thanks

hi  @damit23183 

When you create visual, you need to use all the "date" field from DATE table, do not use any "date" field from fact table.

https://radacad.com/do-you-need-a-date-dimension

 

if you still have the problem, please share your sample pbix file, that will be a great help.

 

Regards,

Lin

Community Support Team _ Lin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
VijayP
Super User
Super User

@damit23183 

Try using DATESYTD with DateDim Table Column and Let me know




Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
MY Blog || My YouTube Channel || Connect with me on Linkedin || My Latest Data Story - Ageing Analysis

Proud to be a Super User!


Hi Vijay,

 

I tried;

 

CALCULATE(DISTINCTCOUNT(ID), DATESYTD(Date[DATE]))

 

It didnt work as well.

 

Thanks

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

Vote for your favorite vizzies from the Power BI World Championship submissions!

Sticker Challenge 2026 Carousel

Join our Community Sticker Challenge 2026

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

January Power BI Update Carousel

Power BI Monthly Update - January 2026

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