Forum Discussion
Export a single visual to pdf using power bi REST api,
Hi AmosHersch there was 1 issue correct syntax is
"filter":"bi_tbl_resthours_violation/violation_date ge ('2023-05-17T19:00:00.000Z') and
violation_date lt ('2023-05-18T19:00:00.000Z')"
I tried to pass in the following ways but nothing worked
"filter":"bi_tbl_resthours_violation/violation_date ge ('2023-05-17T19:00:00.000Z') and
violation_date lt ('2023-05-18T19:00:00.000Z')"
////////////////
"filter":"bi_tbl_resthours_violation%2Fviolation_date%20ge%20(%272023-05-18T19:00:00.000Z%27)%20and%20violation_date%20lt%20(%272023-05-18T19:00:00.000Z%27)"
what is wrong,
I got the response 200 OK, but the export return with (no filter applied result even though I applied the filter)
also with same filter when i pass as url query in power bi portal it works fine, and return the filtered result.
note that I have multiple visuals in same page and multiple pages in same report, I hope it's not an issue.
If the filter now works as expected in Power BI portal for the selected visual it is expected to work when you export. You don't have to escape the filter string (with %20 instead of space, etc.).
You can try exporting the entire report/report page with the same filter and see if it applied instead of a single visual.
I don't have other suggestions besides creating a support ticket with all the details.
- Developmentguy2 years agoRegular Visitor
Ok thank you,
I just wanted to make sure if it is possible, because I saw couple of guys mentioned that filter works if you have single visual in a page, or put single visual in a page and try to export with filter, also on a video published by microsoft on youtube shows single visual in a page.