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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
jmvidal
Helper II
Helper II

Use a variable as column title

Hi,

I have some calculated fields named "CY_sales", "LY_sales", and so on, linked to a date table.

Is there any way I can substitute the field name by a variable to be shown as every column header in tables and matrix?

Id like to show "2020" instead of "CY_sales", and get it changed to "2021" next year.

Thanks,

1 ACCEPTED SOLUTION
MFelix
Super User
Super User

Hi @jmvidal,

In the visualization the name of the measures and columns is the one that appears by default you can change it as you refer but is not possible to make it dinamic.

In terms of dinamic names you can do it for titles of visualization but in the case of the table/matrix headers you cannot make it dinamic.

I believe that in this case the best option is to have a report or visualization title that is dinamyc so in your case if you make a dinamic title for the matrix visualization you can do 2020 and next year 2021.

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

4 REPLIES 4
MFelix
Super User
Super User

Hi @jmvidal,

In the visualization the name of the measures and columns is the one that appears by default you can change it as you refer but is not possible to make it dinamic.

In terms of dinamic names you can do it for titles of visualization but in the case of the table/matrix headers you cannot make it dinamic.

I believe that in this case the best option is to have a report or visualization title that is dinamyc so in your case if you make a dinamic title for the matrix visualization you can do 2020 and next year 2021.

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



Understood, but I can't use this solution because the matrix has CY, LY, LL, TTM columns, so the title can't refer to any specific period.

Thanks anyhow.

Hi @jmvidal ,

 

Your title could be a dinamyc one that says 2020 sales vs 2019 something similar. But just an idea.


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



I guess I could also add a text box with the meaning of the columns: "CY:2020 LY:2019" being the number of the year dynamic.

Thanks,

Helpful resources

Announcements
July 2024 Power BI Update

Power BI Monthly Update - July 2024

Check out the July 2024 Power BI update to learn about new features.

PBI_Carousel_NL_June

Fabric Community Update - June 2024

Get the latest Fabric updates from Build 2024, key Skills Challenge voucher deadlines, top blogs, forum posts, and product ideas.

Top Solution Authors