0
votes

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.

2

2 Answers

0
votes

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

0
votes

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);
    });
});

}