Forum Discussion
Field Parameter Expand/Collapse for Matrix visualization
- 1 year ago
Hi Jihwan_Kim ,
As per your question, this is an expected behaviour with respect to field Parameter introduced with the GA release of field parameters as of July 2025.
Previously, if using a field parameter in an expanded matrix and switching the dimension or measuring the parameter selected, the matrix would collapse. Starting this month, efforts have been made to keep the matrix in the same state as possible.
Refer- https://powerbi.microsoft.com/en-us/blog/power-bi-july-2025-feature-summary/#post-30545-_Toc203388693
Hope this helps!
Hey Jihwan_Kim,
Looking at your Power BI field parameter issue with the matrix visual, this appears to be expected behavior rather than a bug. Here's what's happening and how to address it:
What's Causing This: When you switch from Country to Unit in the field parameter, Power BI drills down to show the unit level. When you switch back to Country, the visual maintains its current drill state but now shows country data at the unit level context.
Solutions:
- Add Drill State Reset Logic:
- Create a measure that detects field parameter changes
- Use SELECTEDVALUE() to check current parameter selection
- Reset drill context programmatically when parameter changes
- Modify Field Parameter Structure:
- Instead of using hierarchical drilling, create separate field parameters for each level
- Use conditional logic in your measures to show appropriate granularity
- Custom Visual Solution:
- Consider using a custom table visual that resets its state when field parameters change
- This gives you more control over the expand/collapse behavior
- User Training Workaround:
- Document this behavior for users
- Add a text box explaining they need to use drill-up when switching back to higher levels
Quick Fix: Add a bookmark that captures the initial state and a button to "Reset View" - this is often the most practical solution for end users.
The root issue is that Power BI treats field parameter changes and drill actions as separate operations, so the visual doesn't automatically reset its drill state when parameters change.
Did it work? ✔ Give a Kudo • Mark as Solution – help others too!
Best regards,
Jainesh Poojara / Power BI Developer
We have the same issue since the last update where the field parameters became GA and the improved expand and collapse states. In that sence t is not a bug but a new feature, but it is messing with out extended field parameters.
So thanks for sharing these solutions. It looks like the first solution stays closest to the current setup. Can you elaborate a bit on this solution. I'm not aware of the fact that you can reset the drill context programmatically. Would appreciate additional guidance.
- jaineshp1 year agoMemorable Member
Hey InfoMagician,
Great question!
You're right to be curious about this - it's not a straightforward built-in function, but rather a combination of techniques that can achieve the desired behavior.
Solution 1: Measure: -
Current Parameter Selection =
VAR CurrentParam = SELECTEDVALUE('Field Parameter'[Field Parameter Fields])
RETURN CurrentParamDynamic Display Measure =
VAR CurrentParam = SELECTEDVALUE('Field Parameter'[Field Parameter Fields])
VAR IsCountrySelected = CurrentParam = "Country"
VAR IsUnitSelected = CurrentParam = "Unit"
RETURN
SWITCH(
TRUE(),
IsCountrySelected, [Country Level Measure],
IsUnitSelected, [Unit Level Measure],
BLANK()
)
Solution 2: Modified Matrix: -
Dynamic Hierarchy =
VAR SelectedParam = SELECTEDVALUE('Field Parameter'[Field Parameter Fields])
VAR CountryName = SELECTEDVALUE(Geography[Country])
VAR UnitName = SELECTEDVALUE(Units[Unit])
RETURN
SWITCH(
SelectedParam,
"Country", CountryName,
"Unit", UnitName,
BLANK()
)
Start with Solution 2 (Modified Matrix Setup) as it's the most reliable and doesn't depend on drill state behavior. It gives you clean control over what displays when each parameter is selected.Fixed? ✓ Mark it • Share it • Help others!
Best Regards,
Jainesh Poojara | Power BI Developer
- Jihwan_Kim1 year agoSuper User
Hi,
Thank you for your suggestion, but I keep failing to implement it. 😥
If it is OK with you, it will be very much helpful if you can describe how to implement it by sharing the link of the sample file or screen shots. It will be very much appreciated, and it will save my tons of time to fix this.
Thank you.
- jaineshp1 year agoMemorable Member
Hey Jihwan_Kim,
Sure, will share the .pbix file in a while.
Best Regards,
Jainesh Poojara | Power BI Developer