Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
I'm having this Expression.Error: This native database query isn't currently supported.
I declared some variables to update some dates in the Main Query.
Does anyone have an idea what's wrong here? It works fine when I run it in SQL Server.
DECLARE @Start_Date DATE, @End_Date DATE, @Update_Date DATE, @Pay_Date DATE, @NextStart_Date DATE;
SELECT
@Start_Date = dateadd(day, -1 * DATEPART(dy,SYSDATETIME()) % 14 , SYSDATETIME())
SET @End_Date = dateadd(DAY , 13,@Start_Date)
SET @Pay_Date = dateadd(DAY , 19,@Start_Date)
SET @Update_Date = dateadd(day,-7, @End_Date )
SET @NextStart_Date = dateadd(day,14, @Start_Date)
IF @Update_Date >= convert(date, SYSDATETIME() ) AND @NextStart_Date <= convert(date, SYSDATETIME())
BEGIN
<Main Query here>
END
Hi, @GFRO
Is the problem occurring in Power BI Desktop or Power BI Service?
Please check if this thread helps:
Solved: Native Database Query Error - Microsoft Fabric Community
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.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
34 | |
21 | |
20 | |
14 | |
12 |
User | Count |
---|---|
21 | |
19 | |
18 | |
14 | |
14 |