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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
NicoleT
Regular Visitor

Using a column distinct value as Parameter query list in Directquery mode

My problem is as below:

 

I have a query in direct query mode. A table named “OuterJoin” and four parameters used in SQL query.

 1.jpg 

When manage the Parameters, I want use the column (AetherExperimentId_T1”)’s distinct value as parameter (AetherExpId_A) ‘s value list.

 2.jpg

3.jpg

 

 

 

What I did is generate a table to get the column distinct value and convert to List. Then I can choose this list query as parameter query above.

 4.png

 

But when Save it, the error info is as below. 

 5.jpg

 

May I know is there a solution if I want to use the column distinct value as Parameter query list in Directquery mode?

Great Thanks!

 

 

 

3 REPLIES 3
ImkeF
Community Champion
Community Champion

Please check this method: https://community.powerbi.com/t5/Desktop/Parameterized-SQL-Query-with-query-folding/td-p/171503

You will only be able to reference non-SQL items as text for this to work.

Imke Feldmann (The BIccountant)

If you liked my solution, please give it a thumbs up. And if I did answer your question, please mark this post as a solution. Thanks!

How to integrate M-code into your solution -- How to get your questions answered quickly -- How to provide sample data -- Check out more PBI- learning resources here -- Performance Tipps for M-queries

Thanks ImkeF! I appriciate it! But I need offer user the parameter value list to choose when they open the power BI template since the data is very big. Any suggestion? 

ImkeF
Community Champion
Community Champion

Sorry, just recognized that I misread your request.

It seems that removing duplicates is not supported in direct query mode, so this will not work unfortunately.

Any chance that you can create a view in the SQL-server for it instead?

Imke Feldmann (The BIccountant)

If you liked my solution, please give it a thumbs up. And if I did answer your question, please mark this post as a solution. Thanks!

How to integrate M-code into your solution -- How to get your questions answered quickly -- How to provide sample data -- Check out more PBI- learning resources here -- Performance Tipps for M-queries

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors