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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
LijunChen
Resolver I
Resolver I

Using Fields Parameter to Create a Measure for Dynamic Title of Visual

Dear fellow users,

 

I am using a field parameters measure to dynamically change the line chart visual based on different fields/indicators (which are create measures). In the field parameter Dax Measure, I revised the names to make it more detailed, so the names and fields have different spellings. The slicers displays the names all right instread of the original field names.

I can also display a dynamic title that changes with the indicator selected through choosing the parameter indicators column as the title. See screenshot below:

LijunChen_0-1684796529750.png

 

However, the problem arises when I tried to create and use a Dax Measure for the dynamic title that include both the Field Parameter and other concatenated text ("across time"). Here is the Dax Measure for the title I created. 

Indicator Parameter TitleOnly = SELECTEDVALUE('Parameter Indicators'[Parameter Indicators Fields],"None Selected") & " across Time"

The title displayed this time is not the revised name in the field parameter any more but the original field name "table[field]". See screenshot below:

LijunChen_1-1684797266725.png

I would appreciate your advice how to solve this problem. 

 

Thanks. 

 

1 ACCEPTED SOLUTION

@amitchandak Thanks for your reply and your helpful blog.  

I revised the dynamic title measure to use Max function with the field parameter. Now the title works fine. 

Indicator Parameter TitleOnly = MAX('Parameter Indicators'[Parameter Indicators])
    & " across Time"

LijunChen_1-1684861595691.png

 

 
 

View solution in original post

5 REPLIES 5
dnzdvd
New Member

Thank you for the head start. However, I found that this will always return the last value in the field parameter filter if none is selected. I added the fourth argument in the field parameter syntax and I modified the field selection values a bit using the following:

IF(
    ISFILTERED(parametername[parameterCat]),
    CONCATENATEX(DISTINCT(parametername[parameterCat]), parametername[parameterCat], ", "), "All")

This will list all values selected, and return ALL if none is selected.
amitchandak
Super User
Super User

@LijunChen , I think switch topn blog can help you

 

Switch TOPN with Field Parameters: https://amitchandak.medium.com/switch-topn-with-field-parameters-299a0ae3725f
Field Parameters- Conditional Formatting
: https://amitchandak.medium.com/field-parameters-conditional-formatting-517aacc23fdf

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

@amitchandak Thanks for your reply and your helpful blog.  

I revised the dynamic title measure to use Max function with the field parameter. Now the title works fine. 

Indicator Parameter TitleOnly = MAX('Parameter Indicators'[Parameter Indicators])
    & " across Time"

LijunChen_1-1684861595691.png

 

 
 

This was helpful. Although in most cases I will have a single parameter value selected, it is possible more than one is selected. So I came up with an addition that can work with that case.

if(DISTINCTCOUNT('Analyse By 2'[Analyse By 2 Fields]) = 1,
MAX('Analyse By 2'[Analyse By 2]),
CONCATENATEX('Analyse By 2', 'Analyse By 2'[Analyse By 2], ", "))

 

It would probably work just using the CONCATENATEX expression, but the whole pattern allows for varying the single and multiple cases further.

Thanks for the response. This is even better. 

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.