Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hi all,
I'm attempting to convert a query from an SQL databse into a foldable query in order to use incremental refresh more efficiently. I am trying to use the Value.NativeQuery() function. When applying the steps i'm met with the following message.
My Advanced editor output. Apologies if SQL isn't the most efficient, i'm learning as i progress.
When using my RangeStart and RangeEnd parameters this is giving me the native query of
select [_].[Round],
[_].[Carrier],
[_].[DateTime],
[_].[PartID],
[_].[QtyMissed],
[_].[Description]
from
(
select
Round,
Carrier,
DateTime,
PartID,
QtyMissed,
Description
from
(
select
MissedCarrierID,
Round,
Carrier,
DateTime,
MissedCarrierReasonID,
PartID,
QtyMissed
from
MissedCarriers
) a
left join (
select
MissedCarrierID,
Description
from
MissedCarrierReasons
) b on a.MissedCarrierReasonID = b.MissedCarrierID
) as [_]
where [_].[DateTime] >= convert(datetime2, '2022-01-01 00:00:00') and [_].[DateTime] <= convert(datetime2, '2022-02-01 00:00:00')
So it looks like it behaving as i would like it to until i click apply. Has anybody else experienced this? Any help would be greatly appreciated. I've tried on a few different quieries but all doing the same thing. I was hoping for a way to do this without needing a view already joining the two tables.
Thanks in advance for any advice.
Hi @BenJCross95 ,
Does the problem occur when using your sql statement query alone?
Is there a relationship between this table with other tables?
Best Regards
Community Support Team _ chenwu zhu
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 38 | |
| 36 | |
| 33 | |
| 32 | |
| 29 |
| User | Count |
|---|---|
| 129 | |
| 88 | |
| 79 | |
| 68 | |
| 63 |