Microsoft Power Bi - Filtering in back-end

Asked

Viewed 127 times

0

Hello. I am starting to study Microsoft Power BI now, and would like help on a question. First I created an excel as a data source:

Fonte de dados

Then I created a data set and a report:

inserir a descrição da imagem aqui inserir a descrição da imagem aqui

All right so far. I’m using the sample solution that Microsoft provides on https://app.powerbi.com/embedsetup. Now I’d like to filter back-end that report.

Example: When it is called in my application, I pass it a back-end ID, and it already Filter the report showing it only with the pertinent information that ID.

inserir a descrição da imagem aqui

In the case of the above image, it would display ONLY the information of Id 5. Without showing the others that appear there without being selected.

Can anyone help me? Thank you.

ADDING INFORMATION: The link that Powerbi Embed generates in the back end is different, and the filter that we tested in the answer below does not work. Any hint of how to solve?

No EmbedService temos o código:
// Generate Embed Configuration.
m_embedConfig.EmbedToken = tokenResponse;
m_embedConfig.EmbedUrl = report.EmbedUrl;

I was able to solve this problem by changing the URL creation in Embedservice, adding:

?rs:embed=true&filter=table/column eq 'filtervalue'

2 answers

0


To do this you will need to complement your URL with the following add-on:

..URL?filter=Table/Field eq 'value'

Something more or less like this:

inserir a descrição da imagem aqui

Important remarks:

  • Table (Table) and field (Field) items are CASE SENSITIVE, the value is not;

  • Fields that do not appear in the report view can still be filtered.

Links that can help you with your questions:

Filter a report using query string Parameters in the URL

Easily embed Secure Power BI Reports in your Internal Portals or websites

How to pass Powerbi Embedded Report

To find your table name, just look at the FIELDS menu in the right corner of your powerbi when it’s in the tab that shows your dashboard.

In this example we have 4 tables: inserir a descrição da imagem aqui

  • What would be the Table?

  • The Table is the name of the structure where Voce placed its columns, in its example ('id, 'name' and 'value')

  • In case it would be: ? filter=Name/Field eq 'One'. But it didn’t work here.

  • is that Voce is putting the column name instead of the table name

  • Should be ? filter=(THE NAME OF YOUR TABLE)/Name eq 'Um'

  • Yes, I don’t know what my table name is. Where is this info?

  • I added an addendum in the reply to Voce find

  • I got it, thank you very much :)

  • Good! If possible mark the answer as resolved, so that others can also be helped. And welcome the community :)

  • Hi Clayton, could you help me with another question about Powerbi? https://answall.com/questions/439386/powerbi-utilizar-conex%C3%a3o-databasecontext-e-real-time

Show 5 more comments

0

The link that Powerbi Embed generates in the back end is different, and the filter we tested above doesn’t work. Any hint of how to solve?

inserir a descrição da imagem aqui

In Embedservice we have the code:

// Generate Embed Configuration.
m_embedConfig.EmbedToken = tokenResponse;
m_embedConfig.EmbedUrl = report.EmbedUrl;
  • I was able to solve this problem by changing the URL creation in Embedservice by adding: ? rs:embed=true&filter=table/column eq 'filtervalue'.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.