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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
rehpyc
Regular Visitor

Parameter / Incremental Refresh data type conversions

With some of our source systems, fact tables are clustered off either a date or datetime field. For both parameter and incremental refresh usage, the date value is being casted as a datetime2, which ultimately causes SQL Server to not use the clustered index (implicit data type conversion, leading to a full table scan off a predicate filter vs. index seek).

 

With parameter usage, is there a way to convert things to standard datetime vs. datetime2 to avoid the implicit conversion of the table field?

 

Though I've read a few tutorials regarding the ability to use a function w/ incremental refresh set up in Power BI Desktop data sets, to cast the datetime values of the RangeStart & RangeEnd to a date (or int), it seems the web service throws errors when attempting this for a data flow or new data mart. Is this a known deficiency?

2 REPLIES 2
bsenden
Regular Visitor

Did you manage to find something that avoids the implicit conversion from Power BI? We are facing the same issue

otravers
Community Champion
Community Champion

Do you actually care about the extra precision provided by datetime2, or do you even care about the time part of the date time at all, for BI purposes? For Power BI consumption purposes, I like to use SQL views with datetime columns where I've dropped the time value (i.e. it's all 00:00:00) and if need hours or even minutes, those can be stored in separate integer columns. That way I don't increase cardinality more than needed, and Power BI incremental refreshes are happy with a datetime column to work with.

 

Just because you use Power Query doesn't mean that you can't push back some data prep to the source SQL server when you control it.

------------------------------------------------
1. How to get your question answered quickly - good questions get good answers!
2. Learning how to fish > being spoon-fed without active thinking.
3. Please accept as a solution posts that resolve your questions.
------------------------------------------------
BI Blog: Datamarts | RLS/OLS | Dev Tools | Languages | Aggregations | XMLA/APIs | Field Parameters | Custom Visuals

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

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.

Top Kudoed Authors