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
dsptchr68
Frequent Visitor

Use a numeric parameter to dynamically name field parameter columns

I have two numeric (what if) paramters that I am using to calculate two measures.  The  user need to be able to input number in these paramters in order to change the number of days being looked back in the data.  I can add those two measures directly to a table with no problem and there is no issue adding both to a field paramter and adding that to the table which is what I am doing.

What I would like to do is use the field parameter in the table and dynamically update the column name based on the value chosen in the numeric parameter.  I have tried using selectedvalue and it returns blank which is odd because selected value comes as a measure in the numeric paramter table and returns the number selected when used elsewhere.  The screen shot below shows one of many options  have tried in the field parameter along with what I wouldlike to get and what I am getting.

I am using superstore data and my two measures calculated the sum of sales for the last x days where x is the chosen number in the numeric parameter.

Any explanation of why this doesn't work or what I can do to get what I want is greatly appreciated.

dsptchr68_0-1708100581174.png

 

1 ACCEPTED SOLUTION
MFelix
Super User
Super User

Hi @dsptchr68 ,

 

The problem here is that you want to add a dynamic name for a table based on a measure, but you cannot use measure to work directly in tables because of the context transictions and you can't use the value of a metric to name or calculate values within a table.

 

Best option that I can see is if you are using a table with a specific number of columns you can use a measure to use has title on your visualization an it's kept changes accordingly or place two visual on top of each other.


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



View solution in original post

1 REPLY 1
MFelix
Super User
Super User

Hi @dsptchr68 ,

 

The problem here is that you want to add a dynamic name for a table based on a measure, but you cannot use measure to work directly in tables because of the context transictions and you can't use the value of a metric to name or calculate values within a table.

 

Best option that I can see is if you are using a table with a specific number of columns you can use a measure to use has title on your visualization an it's kept changes accordingly or place two visual on top of each other.


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

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

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.