Forum Discussion
Power BI Api approach for dynamic report generation
- 4 years ago
Hi ms92ita,
Yes. You should create a dataset for each customer and then generate an embed token with the right DatasetID.
In addition, you should add the following to the config object:datasetBinding: { datasetId: "<DatasetId>" }See dynamic binding and bind datasets dynamically to a report
Hi ms92ita,
I believe you mean a slicer:
Not a filter:
In any case, you have a couple of options:
1. Programatically set the initial slicer selection for each user in your embedded application. See:
Set Slicer State
Update Filters
2. Save the initial report with a "select all" option. For a slicer, you can add it in the visualization pane:
3. Add the same slicer value to all SQL DBs (such as "Default", "Choose a Value" etc...) and save the report with this value. You can adjust the model so that selecting the value presents nothing or presents actual default data relevant to each customer.
4. Technically, you can also save the report with a slicer value that will not appear in any SQL DBs (like "Choose a Value"). No data will be presented and once the user will unselect the value it will disappear from the slicer. I wouldn't recommend this approach since it is kind of a hack and harder to maintain.