Don't miss your chance to take the Fabric Data Engineer (DP-700) exam on us!
Learn moreWe've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now
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
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.
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.
This video explains how to use multiple filelds for one Paremeter option:
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!
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.
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.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 55 | |
| 35 | |
| 31 | |
| 19 | |
| 17 |
| User | Count |
|---|---|
| 75 | |
| 72 | |
| 38 | |
| 35 | |
| 25 |