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

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

Reply
shivaji007
Regular Visitor

How to get selected measure in a field parameter

shivaji007_0-1731917460919.png


I want to get name of selected measure and dimention of field parameter but as selected value don't works for field parameter, Please someone suggest me how I can get the selected measure name.

 

2 ACCEPTED SOLUTIONS
shafiz_p
Super User
Super User

Hi @shivaji007  You could try this to capture selected field value name:

SelectedParameter = 

IF(
    ISFILTERED(Parameter[Parameter Fields]),
    VAR SelectedField = 
        SELECTCOLUMNS(
            SUMMARIZE(
                'Parameter', 
                'Parameter'[Parameter], 
                'Parameter'[Parameter Fields]
            ), 
            "Parameter", 'Parameter'[Parameter]
        )

    VAR SelectedValue = MAXX(SelectedField, [Parameter])

    RETURN
    SelectedValue
    ,
    "No Selection"
)

 

Output:

shafiz_p_0-1731918925848.png

After Selection:

shafiz_p_1-1731918949801.png

 

 

Hope this helps!!

If this solved your problem, please accept it as a solution and a kudos!!

 

Best Regards,
Shahariar Hafiz

View solution in original post

divyed
Super User
Super User

Hello @shivaji007 ,

 

Just add a simple column in your field parameter table and refer to this newly added column in your dax and you are done,

Here are the steps :

1. Create a field parameter if not created already and add members, this will create a  new table

2. Open this table and add a new column refereing values column from filed parameter, Screenshot shows a sample table created when I created a filed parameter "Parameter". A table "Parameter" has been created with 3 columns . Added a column _Selection = Parameter[Parameter Fields] . Now I can use this column in dax for further calculations or so.

    

divyed_0-1731929063566.png

 

I hope this helps. 

Did I answer your query ? Mark this as solution if this helps , Kudos are appreciated.

 

Cheers

 

LinkedIn : https://www.linkedin.com/in/neeraj-kumar-62246b26/

View solution in original post

5 REPLIES 5
divyed
Super User
Super User

Hello @shivaji007 ,

 

Just add a simple column in your field parameter table and refer to this newly added column in your dax and you are done,

Here are the steps :

1. Create a field parameter if not created already and add members, this will create a  new table

2. Open this table and add a new column refereing values column from filed parameter, Screenshot shows a sample table created when I created a filed parameter "Parameter". A table "Parameter" has been created with 3 columns . Added a column _Selection = Parameter[Parameter Fields] . Now I can use this column in dax for further calculations or so.

    

divyed_0-1731929063566.png

 

I hope this helps. 

Did I answer your query ? Mark this as solution if this helps , Kudos are appreciated.

 

Cheers

 

LinkedIn : https://www.linkedin.com/in/neeraj-kumar-62246b26/
shafiz_p
Super User
Super User

Hi @shivaji007  You could try this to capture selected field value name:

SelectedParameter = 

IF(
    ISFILTERED(Parameter[Parameter Fields]),
    VAR SelectedField = 
        SELECTCOLUMNS(
            SUMMARIZE(
                'Parameter', 
                'Parameter'[Parameter], 
                'Parameter'[Parameter Fields]
            ), 
            "Parameter", 'Parameter'[Parameter]
        )

    VAR SelectedValue = MAXX(SelectedField, [Parameter])

    RETURN
    SelectedValue
    ,
    "No Selection"
)

 

Output:

shafiz_p_0-1731918925848.png

After Selection:

shafiz_p_1-1731918949801.png

 

 

Hope this helps!!

If this solved your problem, please accept it as a solution and a kudos!!

 

Best Regards,
Shahariar Hafiz

I am really confused in parameter[parameter] and 'Parameter'[Parameter]

could you give me an example if my field parameter is 

Dynamic Measure = {
    ("Overall Profit Margin", NAMEOF('sales_transactions'[Overall Profit Margin]), 0),
    ("Total Sales", NAMEOF('sales_transactions'[Total Sales]), 1),
    ("Average Discount", NAMEOF('sales_transactions'[Average Discount]), 2),
    ("Total Quantity", NAMEOF('sales_transactions'[Total Quantity]), 3)
}

Anonymous
Not applicable

Hi all,thanks for the quick reply, I'll add more.

Hi @shivaji007 ,

Try this

Measure = 
VAR __SelectedValue =
    SELECTCOLUMNS (
        SUMMARIZE ( Dynamic Measure, Dynamic Measure[Parameter], Dynamic Measure[Parameter Fields] ),
        Dynamic Measure[Parameter]
    )
RETURN IF ( COUNTROWS ( __SelectedValue ) = 1, __SelectedValue )

Using SELECTEDVALUE with Fields Parameters in Power BI - SQLBI

 

Best Regards,
Wenbin Zhou

saud968
Super User
Super User

You're aiming to dynamically construct a title in Power BI using a field parameter, but SELECTEDVALUE doesn't function with field parameters. This is because field parameters allow users to select multiple values, while SELECTEDVALUE is designed for single selections.

Proposed Solution: Using DAX and a Measure

Here's a DAX approach that leverages a measure to capture the selected measure name and dimension from the field parameter:

1. Create a Measure


Selected Measure and Dimension =
VAR SelectedMeasure = SELECTEDVALUE('Dynamic Measure'[Dynamic Measure])
VAR SelectedDimension = SELECTEDVALUE('Dynamic Dimension'[Dynamic Dimension])
RETURN
CONCATENATE(SelectedMeasure, " by ", SelectedDimension)

2. Use the Measure in the Title

In your report, use this measure to dynamically generate the title:

Create a text visual.
Set the expression to [Selected Measure and Dimension].

Best Regards
Saud Ansari
If this post helps, please Accept it as a Solution to help other members find it. I appreciate your Kudos!

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

Top Solution Authors
Top Kudoed Authors