Don't miss your chance to take the Fabric Data Engineer (DP-600) exam for FREE! Find out how by attending the DP-600 session on April 23rd (pacific time), live or on-demand.
Learn moreNext up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now
Hi,
I have a Field Parameter set up in my report, as follows:
P: Fleet or Route = {
("Fleet Groups", NAMEOF('D: Aircraft'[Fleet Groups]), 0),
("Route Group", NAMEOF('M: Market Segmentation'[Route Group]), 1),
("Route Segment", NAMEOF('M: Market Segmentation'[Route Segment]), 2)
}I'm using this on a report page with multiple visuals and metrics, to allow users to switch the axis. This part is fine.
What I want to do is add a hierarchy slicer to the page that contains a list of the 3 Fields from the Field Parameter. I've created a disconnected table to do this, as following:
P: Fleet or Route Hierarchy =
UNION (
SELECTCOLUMNS (
DISTINCT('D: Aircraft'[Fleet Groups]),
"Fleet or Route", "Fleet Group",
"Field Detail", 'D: Aircraft'[Fleet Groups],
"Sort Order", 1
),
SELECTCOLUMNS (
DISTINCT('M: Market Segmentation'[Route Group]),
"Fleet or Route", "Route Group",
"Field Detail", 'M: Market Segmentation'[Route Group],
"Sort Order", 2
),
SELECTCOLUMNS (
DISTINCT('M: Market Segmentation'[Route Segment]),
"Fleet or Route", "Route Segment",
"Field Detail", 'M: Market Segmentation'[Route Segment],
"Sort Order", 3
)
)I want to allow users to choose a Field Parameter for their table, then use the Hierarchy Slicer to narrow down results. For example:
Is there a way to add a filter to the visual that would allow this to happen? I don't want to have to create duplicate wrapped measures just to do this.
Any ideas?
Solved! Go to Solution.
Without creating an extra measure, your current hierarchy filter won’t fully work. You’ll be able to filter Fleet Group, but only one of Route Segment or Route Group will work at a time since they come from the same table and only one relationship can be active.
If you want to avoid using a measure, your options are to create separate dimension tables for Route Segment and Route Group, or add a column in your hierarchy table that uniquely identifies each row in the fact table, like an Index or Record ID. That second option can get messy, especially if you have multiple fact tables.
Either way, even with your current hierarchy table, you’ll likely need to deal with a many-to-many relationship.
Try the attached pbix.
Hi @MJ_Holland,
Thank you for reaching out to Microsoft Fabric Community.
Thank you @danextian for the prompt response.
As we haven’t heard back from you, we wanted to kindly follow up to check if the solution provided by the user's for the issue worked? or let us know if you need any further assistance.
Thanks and regards,
Anjan Kumar Chippa
Hi @MJ_Holland
If my understanding is correct, you want to use field parameters to change the field in the visual, and a hierarchy table to filter the selected field independently of the field parameters. Why not just use two field parameters—one for switching dimensions and another for filtering?
Your current approach requires two relationships to the Market Segmentation table - Route Segment and Route Group - with one being inactive - and you’ll end up needing a measure to activate the inactive one
Create another field parameter like you normally would. This will be independent from the first parameter but you can use this within the same visual and even if you don't you can stil use it to filter the value of that visual.
Hi @danextian ,
This isn't quite what I'm trying to achieve. This only allows me to filter by the list of Fields from the selected Field Parameter. But in my example, I need the user to be able to filter fields from all 3 Fields parameters, even when it's not the one that's been selected.
For example:
How can I do this?
Without creating an extra measure, your current hierarchy filter won’t fully work. You’ll be able to filter Fleet Group, but only one of Route Segment or Route Group will work at a time since they come from the same table and only one relationship can be active.
If you want to avoid using a measure, your options are to create separate dimension tables for Route Segment and Route Group, or add a column in your hierarchy table that uniquely identifies each row in the fact table, like an Index or Record ID. That second option can get messy, especially if you have multiple fact tables.
Either way, even with your current hierarchy table, you’ll likely need to deal with a many-to-many relationship.
Try the attached pbix.
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.
| User | Count |
|---|---|
| 46 | |
| 43 | |
| 39 | |
| 19 | |
| 15 |
| User | Count |
|---|---|
| 68 | |
| 67 | |
| 31 | |
| 27 | |
| 24 |