Aman Garg
Aman Garg

Reputation: 21

Passing parameters in Power bi Filters using java script

We have a web application in which we have embedded Power BI reports.

We are using Direct Query mode for connecting to AzureSql DataBase.

Our Database has DateTime values stored in UTC format. We want users to see these data values in their local time zone(i.e. if users access reports from EST time zone they should be able to see reports according to that time zone and so on). For that we want to pass date as parameters in filters so that we can filter out the content based on current Time zone.

Is this possible?

Please help.

Thanks in advance

Upvotes: 2

Views: 318

Answers (1)

Ankit Kesharwani
Ankit Kesharwani

Reputation: 96

Yes, it can be done as follows.

  1. Create a report level filter for the Time in your report.
  2. Get the UTC time from the client side where the report is being embedded.
  3. Pass the fetched time as the filter to the Power BI embed report object during Phase Loading.

Upvotes: 2

Related Questions