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
RYA
New Member

How to create User prompt for only querying a specific record/customer from DB

Hi,

I have a usecase where I have to build a PowerBI customers report for several PowerBI endusers.
The report is containing:
Customer number, Customer Name, Account number, Account value, Account status, Date


First requirement is: When the end users open/start the report they must be met with a prompt where they enter a customer number and a date to query directly against our customer database on MSsql. When the report is open, they must be able to refresh the data set with the new/next customer number and date. Which ensures that that the dataset in the report only contains information related to searched customer and date.

Second requirement is: The end users should be able to use the reports at the same time.

Third requirement is: It should be published reports.


Is it possible to do in PowerBI and/or other PowerBI related tools?


Regards RYA

 

4 REPLIES 4
v-yiruan-msft
Community Support
Community Support

Hi @RYA ,

You can refer the following links to get it by using Power Query Parameter:

Include Parameters within Power BI to Query a SQL Data Source

(x as text, y as text)=>let
    Source = Sql.Database("x", "y", [Query="select *#(lf)from z#(lf)WHERE [period_number]="&P2&"#(lf)AND [fiscal_year]="&P1&""])
in
    Source

PS: You can create a parameter to filter the customer...

Using Query Parameters in Filter Rows

Create parameterCreate parameteryingyinr_1-1668061957090.pngFilter the rows by the parameterFilter the rows by the parameter

Best Regards

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

Hi Team_Rena

 

Im not sure that the solution can be used for published reports. At least i can't get a pop-up prompt where the end user has to make there input parameters which are Customer no. and date.

 

/Recep

RYA
New Member

Hi @Gengar 

RLS is not an option as I see it.
The end user is only allowed access to data related to the specific customer for a specific task she/he is working on at a given time.
If we only restrict by RLS she has all customers and there accounts in the dataset at all time, and will not restrict for a specific customer dynamicly.

Regards RYA

 

Gengar
Resolver I
Resolver I

Hi @RYA ,

 

Maybe you can use RLS?

Row-level security (RLS) with Power BI can be used to restrict data access for given users. Filters restrict data access at the row level, and you can define filters within roles. In the Power BI service, members of a workspace have access to datasets in the workspace. RLS doesn't restrict this data access.

You can configure RLS for data models imported into Power BI with Power BI Desktop. You can also configure RLS on datasets that are using DirectQuery, such as SQL Server. For Analysis Services or Azure Analysis Services lives connections, you configure Row-level security in the model, not in Power BI Desktop. The security option will not show up for live connection datasets.

https://learn.microsoft.com/en-us/power-bi/enterprise/service-admin-rls 

 

Hope it can help you!

Ganger

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.