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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

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
Resolver I
Resolver I

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?

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
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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