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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Michaelbean21
Advocate II
Advocate II

FILTERING A DATE TABLE BASED ON MIN AND MAX VALUES

I am trying to create a filtered date table based on min and max values which are set to data type "Date/Time".

Michaelbean21_1-1657124757112.pngHowever I am getting an error telling me that "an invalid numeric representation of a date value was encountered". 
But my "Date" in my Complete Date table is also set to data type "Date/Time".

So I have no values to my knowledge that are not data type "Date/Time".

Does anyone know why this happenning?

 



2 REPLIES 2
v-zhangti
Community Support
Community Support

Hi, @Michaelbean21 

 

You can try the following method to create a date table using the maximum and minimum values.

Date = CALENDAR(MIN('Table'[Date]),MAX('Table'[Date]))

vzhangti_0-1657531343038.png

 

Best Regards,

Community Support Team _Charlotte

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

 

 

PaulDBrown
Community Champion
Community Champion

Best practices recommend splitting DateTime values into two separate dimension tables: one for Date; the other for time.
DATESBETWEEN also requires date expression for the parameters:

datesbetween.png

 

 

 





Did I answer your question? Mark my post as a solution!
In doing so, you are also helping me. Thank you!

Proud to be a Super User!
Paul on Linkedin.






Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.