The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
I have a Power BI embedded report, with an API that calls the report from the workspace into our SaaS enviroment. I know we can filter data thru the java in the API call, but I need to know;
1) Is there a limit to how many filters I put into the javascript?
2) If I include a filter that doesn't pertain to any of the data that I'm pulling, will the java still run?
(i.e. Say I have a filter where $ is rounded up but my data does not have any revenue?)
Thank you
Solved! Go to Solution.
Hi @TravisM ,
If you are using the JavaScript API to control report filters, you can use different types of filters, such as basic, advanced, top N, relative date and relative time. You can also apply filters at different levels, such as report, page or visual. There is no explicit limit on the number of filters you can apply using the JavaScript API, but you should consider the performance impact of applying too many filters.
If you include a filter that doesn't pertain to any of the data that you're pulling, the JavaScript will still run, but the filter will have no effect on the report. For example, if you have a filter where $ is rounded up but your data does not have any revenue, the filter will be ignored. You can test JavaScript API in the Power BI Playground.
Best Regards,
Jianbo Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @TravisM ,
If you are using the JavaScript API to control report filters, you can use different types of filters, such as basic, advanced, top N, relative date and relative time. You can also apply filters at different levels, such as report, page or visual. There is no explicit limit on the number of filters you can apply using the JavaScript API, but you should consider the performance impact of applying too many filters.
If you include a filter that doesn't pertain to any of the data that you're pulling, the JavaScript will still run, but the filter will have no effect on the report. For example, if you have a filter where $ is rounded up but your data does not have any revenue, the filter will be ignored. You can test JavaScript API in the Power BI Playground.
Best Regards,
Jianbo Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.