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
Anonymous
Not applicable

Selecting multiple measures with one field parameter selection

Hello community,

I am trying to create a field parameter where two measures are added with one selection. I have no idea if this is actually possible.

Something along the lines of this:

 

Benchmark Categories = {
    ("Value", NAMEOF('Facts'[Value]) & NAMEOF('Facts'[AndValue]), 0),
    ("Frequency", NAMEOF('Facts'[Frequency]), 1),
    ("Volume", NAMEOF('Facts'[Volume]), 2)
    
}

 

 Is this possible somehow? Alternative ways of achieving the same would also be appreciated.

I want to add two measures to every selection in the field parameter, one actual value and one a comparison value

7 REPLIES 7
H3nning
Helper V
Helper V

Dont know if this is actual anymore, but in case someone searches for it: You can do that "old fashioned". Before there were field parameters this was done by an additional table. You crate a table with your selections in it, just one column. For a Table NewTable example:

Measure
A
B

 

Now you put Measure in a slicer. From there you can add as many dependent measures as you link. For Example:

 

SUM= 

SWITCH(

   VALUES(NewTable[Measure]), "A", SUM(ColumnX),"B",SUM(ColumnY)

)

 

AVG= 

SWITCH(

   VALUES(NewTable[Measure]), "A", AVERAGE(ColumnX),"B",AVERAGE(ColumnY)

)

 

You have to fill in NewTable, Measure, ColumnX and ColumnY as in your example.

tyatsenko
Frequent Visitor

I used hierarchies to organize columns and then followed instructions from this video Youtube to create parameters for hierarchy.

One of my hierarchy includes Product Category and Product Subcategory. Using technique from the video - you can group them together under one field parameter.

 

 

 

tyatsenko
Frequent Visitor

This video explains how to use multiple filelds for one Paremeter option:

 

https://www.youtube.com/watch?v=NVREYTHxBvU

This is great. Same fields parameters but you can group them and select on the grouping instead of the individual field parameters. I would accept this one as the solution (but not sure if it applies welll to the original thread poster). Thanks tyatsenko!

rafa-lobo
Advocate I
Advocate I

Hi, I think I have found a solution for this.

 

I had been trying to select two measures with one field as well (one with the actual data and another with targets), and I managed this by:

- Creating two different field parameters with the fields in the correct order (parameter 1 with real data for fields A, B and C; parameter 2 with targets for A, B and C)

- Estabilishing a relationship between the two parameters based on the hidden index field (this is why order is important)

- Adding only one of the created fields to a slicer

 

This way, by selecting values on a single slicer you can use both parameters on your visuals.

amitchandak
Super User
Super User

@Anonymous , You can always select two there.

 

Or you can two field parameters.  what is the objective?

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
Anonymous
Not applicable

Hello and thank you for your reply,

How do I go about adding two there? The code I shared does not work unfortuneately.

The use case is having two seperate measures added to a visualization, one with actuals and one with a comparison measure I have defined. In the Field Parameter slicer I want to just select one of three possible values and any of the three selections will put two measures on the visual rather than having six options and the user has to select the two.

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!

November Carousel

Fabric Community Update - November 2024

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

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.