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

Did you hear? There's a new SQL AI Developer certification (DP-800). Start preparing now and be one of the first to get certified. Register now

Reply
ArchStanton
Impactful Individual
Impactful Individual

Date Column Query

Hi,

 

My new data model is calculating very high Year To Date numbers that never happened in the old data model. Could this code be aggregating rows possibly?

 

YTD New - Area = CALCULATE(TOTALYTD(COUNT('Cases'[Into Area Date]),'Date'[Date],"31/03"))
 

Also, the Measures are almost the same but I've noticed a difference in the Dates icon in the Fields table which I'm guessing maybe the cause?

 

Fig 1. This is the correct Data Model - the dates column is a Box split into 4:

 

ArchStanton_0-1661859560960.png

 

New Data Model - why is this different? Could this be causing errors in my YTD Calculations?

 

ArchStanton_0-1661859785057.png

 

 
Any help would be much appreciated
Thanks

 

 

 

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@ArchStanton , Please mark the date table as date table. Right-click on the table and there is an option. Why date is not shown as date or as key? Check Data type of date

 

Refer

Why Time Intelligence Fails - Powerbi 5 Savior Steps for TI :https://youtu.be/OBf0rjpp5Hw
https://amitchandak.medium.com/power-bi-5-key-points-to-make-time-intelligence-successful-bd52912a5b...

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

View solution in original post

2 REPLIES 2
ArchStanton
Impactful Individual
Impactful Individual

Thanks but Date is already formatted as date.

 

I haven't marked this as a date table because our developers said some problems can arise when doing so (the old data model also doesn't have the date table marked as a date table but it works just fine).

 

Could it be that the formula below  is causing the problem? In the old data model the date column was created in Power Query instead of DAX so it had no formula. Why are our numbers so high?

 

Date = CALENDAR(MINX('Cases','Cases'[tpo_legacycasecreationdate]),TODAY()+[FY Days Remaining])

 

Thanks,

 

 

I needed to populate the rest of this Financial Year upto 31st Mar 2023.

 

 

amitchandak
Super User
Super User

@ArchStanton , Please mark the date table as date table. Right-click on the table and there is an option. Why date is not shown as date or as key? Check Data type of date

 

Refer

Why Time Intelligence Fails - Powerbi 5 Savior Steps for TI :https://youtu.be/OBf0rjpp5Hw
https://amitchandak.medium.com/power-bi-5-key-points-to-make-time-intelligence-successful-bd52912a5b...

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
April Power BI Update Carousel

Power BI Monthly Update - April 2026

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

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

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.

FabCon and SQLCon Highlights Carousel

FabCon & SQLCon Highlights

Experience the highlights from FabCon & SQLCon, available live and on-demand starting April 14th.