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.

Table Representing Parameters Does Not Refresh on Parameter Change

Overview

 

Running into a problem with the table used for a set of parameters within Power BI not refreshing when the parameter selection is changed.  I am interested in this value so that I can lable the origin of data within a report.

 

Steps to Reproduce Unexpected Behavior

 

  • Use edit queries to create a new parameter called "Server" with multiple values.
  • Use edit queries to create a new data source (a Folder in this example) that is based on the value of the "Server" parameter.
    • 01_parameterizedsource.PNG
  • Return to report mode.
  • Create measure to list the name of the current value of the "Server" parameter" and display that measure as a card for easy reference.
    • 02_measurelistingparametervalue.PNG
  • Change the parameter value of "Server" using "Edit Parameters".
  • Select "Apply changes" to handle pending changes to queries that haven't been applied.  Note that the dialog box that appears showing the status of the update includes an entry for the "Server" table.
  • Unexpected behavior.
    • Use "Data source settings" to observe that the data source has been correctly updated to the new value of the "Server" parameter.  (This seems correct.)
    • Look at the text in the card to observe that the measure based on the "Server" parameter has failed to update. (This seems like an error.)
    • 03_measurenotupdated.PNG
  • Manually update the table used to store the "Server" parameter by right clicking on it in the "Fields" blade.
  • Look at the text in the card to observe that the measure based on the "Server" parameter has finally been updated.

 

Version

 

Currently using version "2.46.4732.581 64-bit (May 2017)".

Status: New
Comments
v-qiuyu-msft
Community Support

Hi @Roy,

 

How did you create a table Server to store the parameter "Server" data?

 

Based on my test in Power BI desktop newest version 2.47.4766.542 64-bit (June 2017), if I store the "Server" parameter data via below Power Query,

 

let
    Source = Server,
    #"Converted to Table" = #table(1, {{Source}}),
    #"Renamed Columns" = Table.RenameColumns(#"Converted to Table",{{"Column1", "Server"}})
in
    #"Renamed Columns"

 

Then create a measure like below:

 

ServerName = "Server is  " & FIRSTNONBLANK('ServerName'[Server],TRUE())

 

The card value will change based on selected parameter value.

 

In your scenario, please try  to run the same desktop version as ours, and follow above steps to store parameter.

 

Best Regards,
Qiuyun Yu

Roy
Regular Visitor

Hello @v-qiuyu-msft,

 

The example that I describe is a simplification of the process described in the PowerBI team blog post located at https://powerbi.microsoft.com/en-us/blog/deep-dive-into-query-parameters-and-power-bi-templates/.

 

I did not separately "create a table Server to store the parameter 'Server' data".  I directly used the parameter "Server" list created by PowerBI as a result of using the "New Parameters" dialog from the query editor to create the "Server" parameter.  The table for the "Server" parameter looks like:

 

 

"C:\tmp\a" meta [IsParameterQuery=true, List={"C:\tmp\a", "C:\tmp\b"}, DefaultValue="C:\tmp\a", Type="Text", IsParameterQueryRequired=true]

 

I did expose the "Server" parameter list to the rest of Power BI by right clicking on the parameter definition within the left most blade of the query editor and checking the "Enable load" option.  This causes the parameter definition to appear in the "Report" and "Data" screens of Power BI.  From the "Report" editor I added to this "Server" parameter list the same "ServerName" measure that you define above.

 

I have rolled forward to this month's release of power BI "2.47.4766.542 64-bit (June 2017)".

 

  • I can confirm that the unexpected behavior that I discribe still appears with the value of the measuer defined directly on the parameter list not changing without an explicit refresh of that table.
  • Creating a separate "Source" table using the power query that you define above does not fix my problem with the measure failing to update.
  • Finally, I do see that the content of the "Source" table changes to reflect the current parameter selection.  Perhaps this is what you were observing?

 

Thanks,

-Roy