The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.
Hi all,
I'm encountering an issue in Power BI where my Date/Time columns lose their formatting and hierarchy capabilities when I enable the following setting under Incremental Refresh policy:
✅ “Get the latest data in real time with DirectQuery (Premium Only)”
When DirectQuery is NOT enabled, Power BI correctly recognizes the columns as datetime, and I can use built-in Date Hierarchy (Year > Month > Day, etc.) in slicers and visuals.
Screenshots:
As soon as I enable DirectQuery for real-time data, the datetime columns appear as plain fields, and the hierarchy is no longer available.
I have explicitly applied the correct types in Power Query, e.g.:
= Table.TransformColumnTypes(#"Removed Columns",{{"CreationTime", type datetime}, {"LastModificationTime", type datetime}, {"EffectiveTime", type datetime}, {"InvoiceDate", type datetime}, {"DueDate", type datetime}, {"ReceivedDate", type datetime}, {"PaymentDate", type datetime}})
But this does not resolve the issue once DirectQuery is active for the latest partition. Example screenshots:
I rely on the Date/Time hierarchy in slicers to let users filter data by day, month, and year. Without the hierarchy, the UX is significantly degraded.
Applied type datetime conversion in Power Query (both before and after RangeStart / RangeEnd filters)
Verified data types in the SQL source are already correct
Attempted to build manual hierarchies using calculated columns, but that doesn’t work with DirectQuery
Has anyone faced this issue and found a workaround?
Any way to retain Date/Time hierarchy support while using real-time DirectQuery incremental refresh?
Thanks in advance!
Solved! Go to Solution.
Hey @bIearner83,
DirectQuery real-time mode bypasses Power Query transformations, so your date columns lose their hierarchy recognition. This is a known limitation.
Option 1: Separate Date Table (Recommended)
Option 2: Fix at SQL Source
Option 3: Adjust Refresh Strategy
Try Option 1 first - create a basic date table and see if that solves your hierarchy problem. It usually does and doesn't require changing your source data.
Most people find the separate date table approach works best because it's reliable and doesn't depend on DirectQuery's quirky behavior with data types.
Did it work? ✔ Give a Kudo • Mark as Solution – help others too!
Best regards,
Jainesh Poojara / Power BI Developer
Hey @bIearner83,
DirectQuery real-time mode bypasses Power Query transformations, so your date columns lose their hierarchy recognition. This is a known limitation.
Option 1: Separate Date Table (Recommended)
Option 2: Fix at SQL Source
Option 3: Adjust Refresh Strategy
Try Option 1 first - create a basic date table and see if that solves your hierarchy problem. It usually does and doesn't require changing your source data.
Most people find the separate date table approach works best because it's reliable and doesn't depend on DirectQuery's quirky behavior with data types.
Did it work? ✔ Give a Kudo • Mark as Solution – help others too!
Best regards,
Jainesh Poojara / Power BI Developer
Hi @jaineshp thanks so much for your detailed response. I really appreciate it!!
The DateTable works perfectly in my case. However, I am facing an issue where the report is performaning very slow when published to PowerBI service even after 40 minutes.
Additionally, for DirectQuery, where can I set the refresh window to 4 hours? I can only see the below options under Incremental refresh settings. One is for "Archive data" and the second one is for incremental refresh (currently set to 6 days on safe side to not miss any updates)
Hey @bIearner83,
Based on your screenshot, I can see you're looking at the incremental refresh settings in Power BI. Let me address both of your concerns:
The slow performance (40+ minutes) you're experiencing is likely due to DirectQuery's nature - it queries the source database in real-time. Here are some optimization strategies:
Query Optimization:
Alternative Approach:
Looking at your screenshot, I notice you have incremental refresh enabled, but DirectQuery doesn't actually use traditional incremental refresh settings the same way Import mode does.
For DirectQuery specifically:
Given your performance issues, I'd suggest:
Fixed? ✓ Mark it • Share it • Help others!
Best Regards,
Jainesh Poojara | Power BI Developer
Hey @bIearner83,
Great to hear the DateTable approach worked! Let me address your performance and refresh configuration concerns:
From your screenshot, you have Incremental Refresh configured, not DirectQuery refresh scheduling. These are different concepts:
The 4-hour refresh window I mentioned refers to Automatic Page Refresh, not the incremental refresh settings you're showing. Here's how to configure it:
Option 1: Configure in Power BI Desktop
Option 2: Configure in Power BI Service
Your current 6-day incremental refresh window is reasonable. Consider these adjustments:
The 40-minute load time suggests either network/gateway issues or inefficient queries hitting your source. Focus on optimizing the source queries and reducing visual complexity first.
Fixed? ✓ Mark it • Share it • Help others!
Best Regards,
Jainesh Poojara | Power BI Developer
Excellent information!! Thank you once again.