Forum Discussion
How to pass to report using powerbi-client?
- 1 year ago
Hi hmendezm ,
Filters work well for selecting data, but they don’t directly impact calculations in a report. Since Power BI parameters can’t be dynamically updated per user in an embedded scenario, a different approach is needed.
A better solution is to use a measure in Power BI to dynamically apply the discount percentage. Here’s how you can do it:
-
Create a table in Power BI with possible discount percentages.
-
Use a measure to calculate the discount based on the selected percentage.
-
Pass the discount percentage from the web application as a filter when embedding the report, ensuring each user sees their specific discount without requiring a dataset refresh.
This approach allows discount calculations to update dynamically within Power BI, without modifying the dataset or triggering a full refresh. Let me know if you’d like more details on setting it up!
If this post was helpful, please give us Kudos and consider marking Accept as solution to assist other members in finding it more easily.
-
Hi v-menakakota
Thank you very much for taking the time to reply to my question. We use filters in the report, and it works great to filter the data in the report. However, we need to use the percentage passed from the UI to calculate the percentages in a table. Is it possible in the transformation data section?
Best
hmendezm
Hi hmendezm ,
Filters work well for selecting data, but they don’t directly impact calculations in a report. Since Power BI parameters can’t be dynamically updated per user in an embedded scenario, a different approach is needed.
A better solution is to use a measure in Power BI to dynamically apply the discount percentage. Here’s how you can do it:
-
Create a table in Power BI with possible discount percentages.
-
Use a measure to calculate the discount based on the selected percentage.
-
Pass the discount percentage from the web application as a filter when embedding the report, ensuring each user sees their specific discount without requiring a dataset refresh.
This approach allows discount calculations to update dynamically within Power BI, without modifying the dataset or triggering a full refresh. Let me know if you’d like more details on setting it up!
If this post was helpful, please give us Kudos and consider marking Accept as solution to assist other members in finding it more easily.