Forum Discussion
Apply filters on REST API JSON POST request
- 1 year ago
Ok i've figured why i had this problem, my segment was set to "one selection" so there was always an item selected, the problem was the api downloaded the report with this selcection, then tried to filter it. i just had to uncheck "only one selection", uncheck everything, save the report, then i could filter my report!
First, thx a lot for the response (and sorry for my bad english) but i don't get it,
should the filter be active on both anyway?
i tried dozens of lines i remember one with "reportlevelfilters" i never managed to get rid of the errors and another one with "visuallevelfilters" i tried both on the slicer and on the table but, as the first one i posted here goes to the end without errors, give me the pdf, but filter arent applied.
pdf still exactly the same.
I'm totally new about JSON, first script ever. it's hard to pass the "error..." (took me several days....) but now its seems to go through correctly...but nothing, i don't even know where to look to know where goes the rest of my command.
In your report page you have a slicer visual. These behave different from other visuals when it comes to filtering. Try the same process but switch the visual type from slicer to table.
- Jdrien2 years agoFrequent Visitor
I did it, nothing seems to be selected now:
but this is only a test page, the original page i have to turn into filtered pdf got 3 slicer visuals and i cant replace them with tables.
there has to be a way to manipulate the slicers!- lbendlin2 years ago
Super User
So the filter did not work on the table visual? You will want to fix that first.
- Jdrien2 years agoFrequent Visitor
thx, i managed to get the filter working on the test page with :
{"format": "PDF","powerBIReportConfiguration": {"pages":[{"pageName": "bfed89c6a60971412909"}],"reportLevelFilters": [{"filter": "AuditPdf/associe eq 95"}]}}
but i have trouble appliing this to the main page cause the table and column have specials caracters:
table name is "Default_1 filtre Gauche"
column is "Associé"
i tried like this:{"format": "PDF","powerBIReportConfiguration": {"pages":[{"pageName": "bfed89c6a60971412909"}],"reportLevelFilters": [{"filter": "Default_1 filtre Gauche/Associé eq 95"}]}}but it don't work, i think i have to encode those caracters but i don't know how.