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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
pawanbdiger
New Member

Need help with dynamic query generation and execution in PowerBI

Hello Experts,

I am seeking help in generating dynamic query and automatic execution of the same in Power BI. Below is the scenario I want to achieve 

1. User has slicer which is having names of columns from multiple tables which can have joins among them

2. User selects column names from multiple tables using this slicer

3. Using the selected column names, a dynamic query is generated e.g (select customerID, customerName, OrderId, OrderType, OrderAmt from Customer left Join Order on Customer.CustomerID = Order.CustomerID where CustomerID = 'XXXXXXXX')

4. Then this query is automatically executed in the background and the resultant data is loaded into a dataset

5. The resultant dataset is binded to a table visual with all columns selected

 

I tried using Dax measure to generate dynamic querystring involving one table, however I am not able to

a. find options to execute this query automatically and bind it to dataset

b. generate dynamic query containing selected columns with join condition

 

Thank You

 

1 ACCEPTED SOLUTION
lbendlin
Super User
Super User

No need for a slicer. Enable "Personalize Visuals"  and teach your report users on how to do that.

View solution in original post

4 REPLIES 4
v-achippa
Community Support
Community Support

Hi @pawanbdiger,

 

Thank you for reaching out to Microsoft Fabric Community.

 

Thank you @lbendlin for the prompt response.

 

As we haven’t heard back from you, we wanted to kindly follow up to check if the solution provided by the super user resolved your issue? or let us know if you need any further assistance.
If our super user response resolved your issue, please mark it as "Accept as solution" and click "Yes" if you found it helpful.

 

Thanks and regards,

Anjan Kumar Chippa

Hi @pawanbdiger,

 

We wanted to kindly follow up to check if the solution provided by the super user resolved your issue.
If our super user response resolved your issue, please mark it as "Accept as solution" and click "Yes" if you found it helpful.

 

Thanks and regards,

Anjan Kumar Chippa

Hi @pawanbdiger,

 

As we haven’t heard back from you, we wanted to kindly follow up to check if the solution provided by the super user resolved your issue.
If our super user response resolved your issue, please mark it as "Accept as solution" and click "Yes" if you found it helpful.

 

Thanks and regards,

Anjan Kumar Chippa

lbendlin
Super User
Super User

No need for a slicer. Enable "Personalize Visuals"  and teach your report users on how to do that.

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.