I have a powerBI M Query which gets filter on the basis of 3 paramters startDate, endDate and locationId. I am fetching the data from azure database.
select * from testFunction(startDate,endDate,locationId)
I have created 3 new paramters in my Data Transform startDate, endDate and locationId with the default value of 1701388800000,1701475200000 and 3 respectively.
But after publishing the dashboard to powerbi web, when i try to pass the variable data in my powerbi url i just get the data for the default values and not for the values which i have passed in my url.
https://app.powerbi.com/reportEmbed?reportId=${reportId}&autoAuth=true&ctid=258ba36a-1b5f-4dd4-9ec0-3578958ea03c&filter=StartDate%20eq%20%271702598400000%27%20and%20EndDate%20eq%20%271702684800000%27%20and%20LocationId%20eq%205
Is there any way to achieve this?
Thanks you in Advance
In non-Paginated Power BI reports, you can only pass URL Parameters to filter the report (ie tables).
Try the following (I haven't tested this myself, but it should work).
Ensure you complete Create tables of values and the following steps, so that you have a table with values for each parameter and that it is bound.
Do take special note of the following (in the same link above):
Considerations and limitations
There are some considerations and limitations when you use dynamic M query parameters:
- A single parameter can't be bound to multiple fields nor vice-versa.
- Table names can't contain spaces or special characters.
- If your parameter is the Date/Time data type, you need to cast it within the M query as DateTime.Date().
After the above is done, test your report with a slicer for each bound parameter. When all is working as expected, then you can try Filter a report using query string parameters in the URL.