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

Get certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now

Reply
duggy
Advocate II
Advocate II

Passing parameters from (.Net C#) embedded to Power BI

Hi,

 

I have my powerbi embedded into my website (.Net ASP C#) where I pass the username parameter for the user who is logged in. This filters through Roles the data that the user is allowed to see. Works great. The question though is can I pass other parameters to Power BI in the same fashion?

 

For example I want to pass a date parameter to the date table so as the user travels from page to page (website pages) and there are other embedded Power BI pages in these pages, they dont have to reset the date range. I want to pass the start and end dates accordingly so they see the same set of data.

 

Is this in any way possible through Roles or any other fashion?

 

Much appreciated.

1 REPLY 1
Anonymous
Not applicable

I'm not sure if this is possible using just C# but you could probably get it working using the Javascript configuration. 

Either doing it all on the client side, pass the date in a cookie or something, or try and pass the date to back-end and then return it back to client with the embed configuration and filter client side. 

https://github.com/Microsoft/PowerBI-JavaScript/wiki/Embed-Configuration-Details#options

https://github.com/Microsoft/PowerBI-JavaScript/wiki/Filters

Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

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

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

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