Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
At the highest level, this is what my bar chart should look like:
In the data each row is an area with a Loc (the field name), ID1, and ID2. These values are hierarchical, so each Loc (field name) may have 1-5 ID1 values, and each ID1 may hav 1-10 ID2 values.
I want to use a slicer to allow users to quickly switch the x-axis and traverse through the hierarchy.
For example, if a user wanted to view ID1, they would see the following.
Using the drill-down and drill-up buttons is confusing, and I just want it to be easy for the user to switch between these values.
Currently I have attempted to use field parameters to achieve this:
I followed this Guy in a Cube tutorial: https://www.youtube.com/watch?v=5G_xSJy5muo
I created a field parameter called Location with the following code:
When I create the slicer I put Value4 in the slicer:
But if I select ID1, it only shows ID1 without the fields:
How do I reconcile this so that I can use field parameters to navigate through the hierarchy and show numerous levels on the x-axis of the bar chart?
Hi @AFriendlyMonkey ,
First, make sure that the hierarchical relationships between Loc1, ID1, and ID2 are properly defined in the data model.
Since in Power BI Desktop, dates are automatically created in the hierarchy, the rest may need to be set up by you according to your needs.
You can refer to this step by step:
1. Select More Options on the right side of Loc and then select Create hierarchy.
2. Select More Options on the right side of ID1 and ID2 and then select Add to hierarchy and then select the hierarchy you just created.
Second, instead of using a standard slicer with field parameters, consider using a hierarchy slicer.
Hierarchy slicers allow you to visualize and navigate hierarchical data more intuitively.
You can create a hierarchical slicer by adding fields (Loc, ID1, ID2) to the slicer visual object and arranging them in hierarchical order.
For more information about the Hierarchy Slicer, see the following documentation:
Add multiple fields to a hierarchy slicer - Power BI | Microsoft Learn
If you have any further questions please feel free to contact me.
Best Regards,
Yang
Community Support Team
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
This solution does not produce the slicer I want. When I follow your instructions I end up with a slicer like this:
The variable in my y-axis is a measure, so I want it to summarize the information at either a Field, ID1, or ID2 level. With the slicer you made, the user can select specific fields, but it still must also show ID1 and ID2 with the field.
I would rather the slicer appear like this (the one made with the tutorial):
So I want the user to choose the lowest level of the hierarchy that the graph displays. For example, if ID1 is chosen, I want it to still show the field as well:
Because the IDs can repeat on different fields, it is useless to summarize to only ID1 or ID2. The best solution I found was simulating a hierarchy with a dynamic slicer, but this seems to only show the lowest level and is described by the problem in the past sentence.
If there is a solution to choose the level of hierarchy displayed with a slicer, that would be perfect.
User | Count |
---|---|
84 | |
80 | |
70 | |
47 | |
43 |
User | Count |
---|---|
108 | |
54 | |
50 | |
40 | |
40 |