Don't miss your chance to take exam DP-600 or DP-700 on us!
Request nowLearn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now
let
pvDate =
if Date.DayOfWeek(PriceDate) = 0 then
Date.AddDays(PriceDate, -6)
else if Date.DayOfWeek(PriceDate) = 1 then
Date.AddDays(PriceDate, -6)
else if Date.DayOfWeek(PriceDate) = 2 then
Date.AddDays(PriceDate, -6)
else if Date.DayofWeek(PriceDate) = 3 then
Date.AddDays(PriceDate, -6)
else
Date.AddDays(PriceDate, -4),
yyyyMM = DateTime.ToText(pvDate, "yyyyMM"),
yyyyMMdd = DateTime.ToText(pvDate, "yyyy-MM-dd"),
Source = Sql.Database("localhost", "CSWebChecksWebsite", [Query="Select axdgn202305.ClientFTP As [Client FTP], PriceValue From axdgn202305, AxiomClients where AxiomClients.clientFTP = axdgn202305.ClientFTP and PriceDate = '20230515' and PriceSource = 'priced' and AxiomClients.checksEnabled = 1"])
in
Source
I have the above query in direct query mode which is working fine. The date is fixed, once I change to the following code, it would complain of error. PriceDate is a parameter which I intend to display a date slicer for user to pick a date. Something todo once this is fixed.
Source = Sql.Database("localhost", "CSWEBChecksWebsite", [Query="Select LOWER(axdgn" & yyyyMM & ".ClientFTP) As [Client FTP], PriceValue From axdgn" & yyyyMM & ", AxiomClients where AxiomClients.clientFTP = axdgn" & yyyyMM & ".ClientFTP and PriceDate = '" & yyyyMMdd & "' and PriceSource = 'priced' and AxiomClients.checksEnabled = 1"])
The data would load fine, but the apply step yields the following error. Any idea how to resolve the issue?
Solved! Go to Solution.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
Check out the February 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 54 | |
| 47 | |
| 39 | |
| 16 | |
| 15 |
| User | Count |
|---|---|
| 83 | |
| 70 | |
| 38 | |
| 28 | |
| 27 |