Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
Hi all,
I have a matrix that shows costs over months by cost item and further drill down to cost account level. Now I want to build in a drill through that when they click on a cost they can go to another page they can see either which entity the costs are in or which function/subfunction the cost are in. This option I wanted to create with a parameter where the user could choose which view to see. However I see that the parameter is not allowing me to switch between two items that are hierarchies. Any suggestions how to tackle this issue?
kind regards,
Frank
Solved! Go to Solution.
Hey Frank!
Since Power BI parameters do not support hierarchical switching directly, you can use a disconnected table and dynamic measures to achieve the effect.
First create a parameter table in Modeling - > new table , then add this DAX:
HierarchySelection =
DATATABLE(
"View Option", STRING,
{
{"Entity-Level Costs"},
{"Function/Subfunction Costs"}
}
)
This table allows users to select which hierarchy they want to see.
Now, define a measure that switches between hierarchies based on the selected parameter.
SelectedHierarchy = SELECTEDVALUE(HierarchySelection[View Option])
DynamicHierarchy =
SWITCH(
[SelectedHierarchy],
"Entity-Level Costs", MAX(YourTable[EntityCost]),
"Function/Subfunction Costs", MAX(YourTable[FunctionCost]),
BLANK()
)
Hope this helps!
😁😁
Hey Frank!
Since Power BI parameters do not support hierarchical switching directly, you can use a disconnected table and dynamic measures to achieve the effect.
First create a parameter table in Modeling - > new table , then add this DAX:
HierarchySelection =
DATATABLE(
"View Option", STRING,
{
{"Entity-Level Costs"},
{"Function/Subfunction Costs"}
}
)
This table allows users to select which hierarchy they want to see.
Now, define a measure that switches between hierarchies based on the selected parameter.
SelectedHierarchy = SELECTEDVALUE(HierarchySelection[View Option])
DynamicHierarchy =
SWITCH(
[SelectedHierarchy],
"Entity-Level Costs", MAX(YourTable[EntityCost]),
"Function/Subfunction Costs", MAX(YourTable[FunctionCost]),
BLANK()
)
Hope this helps!
😁😁
User | Count |
---|---|
98 | |
75 | |
69 | |
50 | |
27 |