This is best Fabric, Power BI, SQL and AI community event. How do we know? The last event sold out! Save €200 with code FABCMTY200.
Register nowA new Data Days event is coming soon! This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. Don't miss out.
i'm coming from an SSRS background. I'm mimicking a report we have in SSRS. i dont want to use a connector as we will be using the Power BI version from now on if we can get this working.
I've connected using a SQL statement and have a parameter called @Workspace and trying to add this dataset called @Location and this code below would do the work (this is a dataset i have on SSRS).
I tried using DECLARE but getting errors.
Any help appreciated
IF @Workspace <> -1
BEGIN
SELECT
Id, Name, WorkspaceId, SortGroup
FROM
dbo.vw_pl_Locations
WHERE
Id = -1 OR
(WorkspaceId = @Workspace AND
Id <> @Workspace)
END
IF @Workspace = -1
BEGIN
SELECT
Id, Name, WorkspaceId, SortGroup
FROM
dbo.vw_pl_Locations
WHERE
Id = -1 OR
Id NOT IN (SELECT Id FROM dbo.vw_pl_Workspaces AS vpw)
END
Solved! Go to Solution.
@Anonymous , I doubt you van give parameters like this
refer
https://www.biinsight.com/power-bi-desktop-query-parameters-part-1/
@Anonymous , I doubt you van give parameters like this
refer
https://www.biinsight.com/power-bi-desktop-query-parameters-part-1/
Would you know a workaround?
Check out the May 2026 Power BI update to learn about new features.
Sign up to receive a private message when registration opens and key events begin.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
| User | Count |
|---|---|
| 31 | |
| 26 | |
| 23 | |
| 22 | |
| 15 |
| User | Count |
|---|---|
| 62 | |
| 47 | |
| 28 | |
| 24 | |
| 20 |