The User
The User

Reputation: 47

How to Embed a PowerBI Report having filters showing start and end date

How to embed Powerbi report that contains start and end date filter I have a embedded report but I have no clue how can I show some data between the Start and end date can somebody point me into the right direction for this.

Upvotes: 0

Views: 976

Answers (2)

Karthik
Karthik

Reputation: 21

I've been working similar scenario this sample code could help for you. You can pass the filter value through js.

var Filter1 = {
  $schema: "http://powerbi.com/product/schema#advanced ",
  target: {
    table: "Transaction",
    column: "tx_date)"
  },
  logicalOperator: "AND",
  conditions: [
    {
      operator: "GreaterThan",
      value: "19-08-2016"
    },
    {
      operator: "LessThan",
      value: "19-08-2017"
    }
  ]
}

report.on('loaded', event => {
  report.getFilters()
    .then(filters => {
      filters.push(Filter1);
      return report.setFilters(filters);
    });
});

}

Upvotes: 0

user7380440
user7380440

Reputation:

It is not possible in Power BI to use a single slicer (filter) for two columns. Instead, you can use parameters.

Upvotes: 0

Related Questions