Quantcast
Channel: All Developer posts
Viewing all articles
Browse latest Browse all 48143

Adding Custom Filter to Embed report

$
0
0

I am working on a demo project which uses the powerbi.js file to embed the report.

 

var reportConfig = {
                settings: {
                    filterPaneEnabled: true
                }                
            };

var report = powerbi.embed(reportElement, reportConfig);

 

 

I am trying to create a filter object and set it to the reportConfig's property so the report gets loaded along with the filter.

Below is the basic filter I am creating.

 

 var basicFilterdemo = {
                $schema: "http://powerbi.com/product/schema#basic",
                target: {
                    table: "Query1",
                    column: "Email"
                },
                operator: 'In',
                values: ['test@gmail.com']
            };

 

Can some one help me get a way to configure the filter. 

setting 

var reportConfig = {
                settings: {
                    filterPaneEnabled: true
                },
basicFilter:basicFilterdemo };

 

dint work and also how do I set the level(Report/Page) at which this filter would be set.

 

calling addFilter() inside report.on('loaded',function() works fine but the original report is first loaded and stays there for a couple of seconds and then the change occurs. So that isnt a viable option for me

 


Viewing all articles
Browse latest Browse all 48143

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>