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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

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
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 community update carousel

Fabric Community Update - June 2025

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