Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
acn_bi
Frequent Visitor

Filter an embedded Power BI report according to the page it is embedded in

Hi,

I would like to know what is the best way is to approach the following business requisite:

There is a web page built on top of SAP Cloud for Customer that is used to monitor store performance and has the following structure:

 

Page #1

  • Page 1 acts as a “landing page”; it has a list with several store numbers.
  • In this example, we will select the Store 3, which is going to take us to the Page #2.

 

Page #2

  • On top of the page, it has some general information about Store 3 – In this specific example is Store 3 because that what we have selected on Page #1, otherwise it would have information about Store 4 or 5 depending on what was chosen before.
  • On the bottom, it has an embedded Power BI report.

 

Power BI

  • Since the Page #2 is displaying data for the Store 3, the embedded Power Bi report SHOULD ONLY DISPLAY data for Store 3.
  • The idea here is to have the embedded Power BI report filtered specifically for the store that has been selected. In this specific case, everything on Page #2 should be showing only the data regarding the Store 3.

 

What is the best way to achieve this? How can I “pre-filter” the embedded Power BI report according to the page that it is embedded in?

All help is needed!

Thank you!

(image for better understanding below)

 

acn_bi_0-1656054138106.png

 

1 ACCEPTED SOLUTION
v-yalanwu-msft
Community Support
Community Support

Hi, @acn_bi ;

This is done in the code editor, so you can ask your developers.


Best Regards,
Community Support Team _ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
v-yalanwu-msft
Community Support
Community Support

Hi, @acn_bi ;

This is done in the code editor, so you can ask your developers.


Best Regards,
Community Support Team _ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

v-yalanwu-msft
Community Support
Community Support

Hi, @acn_bi ,

Do you mean this way of embedding? Embed web. If it is, and I've tested it, it can be screened directly.

vyalanwumsft_0-1656297846016.png

https://docs.microsoft.com/en-us/javascript/api/overview/powerbi/control-report-filters


Best Regards,
Community Support Team _ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Dear @v-yalanwu-msft,

Yes, it is that way of embedding.

Thank you for the link that you've shared, I believe this is it. However, I'm not understanding how do I fit the "Basic Filter" in the embedding URL.

Trying to use something like the example that's shown below - it is the same as the one in the documentation - How do I insert the code below? Or how do I 'mix' it with the embedding URL that we get when we click "Embed report" -> "Website or Portal"?

 

const basicFilter = {
  $schema: "http://powerbi.com/product/schema#basic",
  target: {
    table: "Store",
    column: "Count"
  },
  operator: "In",
  values: [1, 2, 3, 4],
  filterType: models.FilterType.BasicFilter,
  requireSingleSelection: true
}

 

Untitled.jpg

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Kudoed Authors