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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
harshadsp
Post Patron
Post Patron

Slicer value to web api

Hello Experts,

 

Need your help! I have created a pbi report with data source as web api. Also I have created a slicer with all distinct values of departments from one table. Now the question is how do I pass the selected depratment value from slicer to this web api? web api is written in C# and would return the data for that departmnet.

 

Any help is highly appreciated!

 

Thank you!

 

7 REPLIES 7
v-yulgu-msft
Employee
Employee

Hi @harshadsp,

 

It is not possible to pass slicer selection to data source (Web API). The slicer works to filter displayed data on report view, rather than filter the loaded dataset.

 

Best regards,

Yuliana Gu

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

Thanks @v-yulgu-msft for the confirmation. I was thinking another way that I will create a icon and provide the link for the data filter but I guess that will open the another report. Is there any workaround that I can display in the same report.

 

Please advise. Thanks!

Hi @harshadsp,

 

It is not possible to pass slicer value to query string to dynamically change loaded dataset. One thing you should be aware of is that:

Power BI load data via Power Query first, then, add data from dataset into report view. Slicer displays value on report view, which is generated afterwards Power Query execution.

 

As a workaround, you can consider using Query Parameter which is used for Power Query, dynamically loading data based on specified value for parameter.

Power BI Desktop Query Parameters, Part 1

Using Parameters in Power BI

 

One limitation to this workaround is that end viewers you share report with via Power BI Service cannot change the parameter value.

 

Regards,

Yuliana Gu

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

Thanks @v-yulgu-msft for your suggestion and links. I somehow manage to create a function on top of web api url and then invoked a custom column for this function by passing the other column values as a parameter to function. Then put the other column in slicer. Now what user see is if he click on any slcier value the other graph renders for that value. Acyually the jason is already parsed from url for all the values but it visually effects what he wants.

 

I will go though the links and try to use the logic with other report.

 

Thank you so much for your time & efforts, I appreciate it!

 

Harshad

Hi @harshadsp,

 

I'm afraid such a requirement is not available now.

 

  1. It is not supported to pass any slicer value to Power Query.
  2. The only parameter that can be passed to Power Query is Query Parameter mentioned above.
  3. "Now what user see is if he click on any slcier value the other graph renders for that value."—— Query parameter is not accessable to end users. They are not able to select parameter values. As the edit box for parameter is hosted on the top ribbon in desktop, but end users can only see the report page. 

 

Regards,

Yuliana Gu

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

Thank you @v-yulgu-msft for this complete insights! I will try using this.

harshadsp
Post Patron
Post Patron

Hello all, any thoughts? Please help, thanks

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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