Query parameter always using current value instead of query result?

DirectorAlwyn

New member
Joined
Apr 4, 2016
Messages
8
Reaction score
0
Points
0
I feel like I must be missing something really, really basic here, but I've been trying to work with the newish Query Parameters, and no matter what I do the parameter always uses the "Current Value" rather than the value of the query I've tied it to. I have my parameter set to:

Required: Check
Type: Text
Suggested Values: Query
Query: UCN Query
Current Value: 99 9903104 (since it won't let me leave it blank)

UCN Query is below. No matter what I change that field in my table to, the UCN Query will show the correct result but the UCN Parameter itself will just use the current value. Any ideas what I'm doing wrong?
let
Source = #"Parameter Table",
#"Filtered Rows" = Table.SelectRows(Source, each ([Parameters] = "UCN")),
Values = #"Filtered Rows"{0}[Values],
#"Converted to List" = {Values}
in
#"Converted to List"
 
I see this was posted back in January, sorry not to have responded earlier.

Source = #"Parameter Table", but your parameter is set to
Required: Check
Type: Text
Suggested Values: Query
Query: UCN Query
Current Value: 99 9903104 (since it won't let me leave it blank)

I'm probably being dense here, but I'm not sure how the one relates to the other.

Here's my take on your M code:
// filters rows where Parameters column value equals "UCN"
Code:
[COLOR=#3E3E3E]#"Filtered Rows" = Table.SelectRows(Source, each ([Parameters] = "UCN")),[/COLOR]


// filters to first row: '{0}' does this. '[Values]' displays only the value of cell in Values column
Code:
[COLOR=#3E3E3E]Values = #"Filtered Rows"{0}[Values],

[/COLOR]
// converts 1st row of UCN rows, Values column to a list
Code:
[COLOR=#3E3E3E]#"Converted to List" = {Values}[/COLOR]
[/CODE]
Do you see why values don't see to change?

To find what you're looking for... please provide a bit more info.
 
Last edited:
Back
Top