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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
ashukla2
Regular Visitor

DirectQuery Not Updating with Parameter Change

I have two DirectQueries made that both use the same set of parameters. The only difference between the two queries is which columns are shown from the SQL query. I connected all my parameters to slicers on the dashboard and bound them correctly. The problem I'm facing is when I change the values of the slicer, only one of the DirectQueries is being updated and the results for that table on the dashboard are being changed. The other query is not changing at all and is still using the 'Current Parameters' that were set in Transform Data, not from the dashboard slicers. I copy/pasted the PowerQuery code from the working one to the other one too, so it should be working. 

 

Has anyone faced this issue, and/or have a fix for this?

3 REPLIES 3
lbendlin
Super User
Super User

My understanding is that a parameter can only be bound to one column at a time, and vice versa.

 

Spoiler
Yes, I have that each parameter is only bound to one column. I am using the same column/parameter value in mulitple queries. Here is sample of my M queries, the only difference in the queries is the bolded parts: 

Query 1:
let

str = if Text.Length(test_param) > 0
then " WHERE table1.col1= '" &test_param& "'"
else "",


Source = Value.NativeQuery(PostgreSQL.Database("localhost", "database"),
"SELECT table2.col2#(lf)
FROM table2#(lf)
INNER JOIN table3 ON table2.col3= table3.col3#(lf)
INNER JOIN table1 ON table1.col1= rates.col1#(lf)
"&str&" #(lf)
GROUP BY table2.col2, null, [EnableFolding=true])

in
Source

Query 2:
let

str = if Text.Length(test_param) > 0
then " WHERE table1.col1= '" &test_param& "'"
else "",


Source = Value.NativeQuery(PostgreSQL.Database("localhost", "database"),
"SELECT table1.col4#(lf)
FROM table2#(lf)
INNER JOIN table3 ON table2.col3= table3.col3#(lf)
INNER JOIN table1 ON table1.col1= rates.col1#(lf)
"&str&" #(lf)
GROUP BY table1.col4, null, [EnableFolding=true])

in
Source



When I change the value of test_param, only the table connected to Query 1 updates, the table for Query 2 does not.

 

 

Please validate your SQL queries and their joins.  You seem to do crossjoins with the rates table and with table1.

Helpful resources

Announcements
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! Prices go up Feb. 11th.

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

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