Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi everyone,
Does anyone know how to read — using DAX — the field that is currently active or filtering a row when using a Field Parameter?
Here’s the scenario:
I have a Field Parameter that allows users to switch between fields A, B, and C in the rows of a matrix visual.
Now, I’d like to create a measure in the Values section that behaves differently depending on which field is currently shown in the row.
For example:
However, SELECTEDVALUE('Field Parameter'[Fields]) returns blank, while HASONEVALUE returns true — so I know there’s a context, but I can’t capture which field is actually driving the row.
What I need is a way to return the name of the field (A, B, or C) that is currently visible in the row from the Field Parameter, so I can condition my measure accordingly.
Has anyone tackled something similar?
Thanks in advance!
Solved! Go to Solution.
Hi @rampie ,
this is a key limitation in Power BI's current field parameter design
I suggest submitting your detailed feedback and ideas through Microsoft's official feedback channels, such as Microsoft Fabric Ideas. Feedback submitted through these channels is frequently reviewed by the product teams and can contribute to meaningful improvements.
https://ideas.fabric.microsoft.com/ideas/search-ideas/
Regards,
Chaithanya.
Hi @rampie ,
As we haven’t heard back from you, we wanted to kindly follow up to check if the solution provided for the issue worked? or Let us know if you need any further assistance?
If our response addressed, please mark it as Accept as solution and click Yes if you found it helpful.
Regards,
Chaithanya
Hi Chaithanya,
As we discussed, there is no solution for this issue at this moment, so i let the idea in MSFT Fabric Ideas.
Thanks for following up.
Best Regards
Richard.
Hi @rampie ,
As we haven’t heard back from you, we wanted to kindly follow up to check if the solution provided for the issue worked? or Let us know if you need any further assistance?
If our response addressed, please mark it as Accept as solution and click Yes if you found it helpful.
Regards,
Chaithanya
Hi @rampie As i understand, you can use the ISINSCOPE() DAX function to detect which field is currently active in a matrix visual when using a Field Parameter
example-
Yes, what you mentioned is definitely valid — ISINSCOPE() works well for detecting if a specific field is present in the current context.
However, following your example:
If the user selects Region, Product, and Salesperson (in that order, with Salesperson being the last in the hierarchy), then ISINSCOPE() will return true for all three fields, since they are all present in the visual’s row context.
The challenge is that there’s no way to detect which field is currently the "lowest" or deepest level in the hierarchy — the one actually driving the value at that specific row — because ISINSCOPE() returns true for all active levels above and including the current one.
That’s the part I’m trying to solve — identifying the exact field that’s currently "visible" or "active" on each row when multiple fields from the Field Parameter are selected.
Hi @rampie ,
Thank you for reaching out to Microsoft Fabric Community Forum.
You're absolutely right — ISINSCOPE() is helpful for checking whether a field is part of the current evaluation context. However, as you've rightly pointed out, when multiple fields from a hierarchy or a field parameter are selected, ISINSCOPE() returns TRUE for all visible levels, making it difficult to identify which field is currently the deepest or most granular level being evaluated in that row.
A commonly used solution is to simulate the detection of the "active" level by checking ISINSCOPE() in reverse order — from the most detailed to the broadest field — using a SWITCH(TRUE()) structure.
Here’s a sample approach assuming a hierarchy like Region > Product > Salesperson
CurrentLevel =
SWITCH(TRUE(),
ISINSCOPE('Test'[Salesperson]), "Salesperson",
ISINSCOPE('Test'[Product]), "Product",
ISINSCOPE('Test'[Region]), "Region",
"Unknown"
)
2) If you're at the Salesperson level, only that check will trigger first and return "Salesperson".
3) If you're at the Product level but not drilled into Salesperson, you'll get "Product", and so on.
4) This allows you to detect and respond dynamically to whichever field is currently active at each row level in visuals like matrix tables or charts.
5) Let me know if you'd like help applying this in your model or adjusting it for nested measures, conditional formatting, or tooltips
Regards,
Chaithanya.
Thanks again your explanation is spot on for standard hierarchies where the levels have a parent-child relationship.
However, in the case of Field Parameters, there’s an additional complexity:
The fields selected are not necessarily part of a fixed hierarchy, and the order in which they appear in a matrix depends on how the user selects them.
So for example, a user could select Salesperson first (the most granular), and then Region, which technically becomes the deepest row level in the visual. In this case, even though Region is higher in the hierarchy conceptually, it becomes the "active" level in that row. But ISINSCOPE() will return TRUE for both, and the SWITCH logic will prioritize Salesperson, giving a misleading result.
This makes things tricky when using field parameters to mix fields that aren't part of a true hierarchy (e.g., Product, Region, Customer Type, etc.). From what I’ve tested, Power BI doesn’t expose the row-level metadata of field parameters, so there's no way to detect which field is actually rendering the current row.
If there’s a workaround to detect the actual "visible" field at the row level from a field parameter context, I’d love to hear it, but so far, it seems like a gap in current Power BI capabilities.
Hi @rampie ,
this is a key limitation in Power BI's current field parameter design
I suggest submitting your detailed feedback and ideas through Microsoft's official feedback channels, such as Microsoft Fabric Ideas. Feedback submitted through these channels is frequently reviewed by the product teams and can contribute to meaningful improvements.
https://ideas.fabric.microsoft.com/ideas/search-ideas/
Regards,
Chaithanya.
Hi @rampie ,
Here are the few points for the above mentioned questions
Regards,
Chaithanya.
Thanks for the summary of the points we discussed.
It’s always helpful to clarify what is and isn’t possible with each Power BI functionality.
In the end, we all agree that it’s not currently possible to detect which field is selected at the row context level, so let’s go ahead and mark this case as closed.
You can use SELECTEDVALUE on the Order column of the field parameter. That will uniquely identify each row. The downside is that you have to update the DAX if you change the order of the fields.
hi @johnt75
Thanks for your response, it actually does work, but with one key limitation.
SELECTEDVALUE respects the filter context, not the row context of the matrix.
So, it only works when a single field is selected in the slicer. If the user selects two or more fields, the measure doesn’t return the name of the field currently shown in each row, it just returns blank, since there's no single selected value at the slicer level.
This means that SELECTEDVALUE applies to the slicer selection, not to the specific row field inside the matrix, and as a result, the measure fails or returns unexpected results when multiple fields are selected.
Any ideas on how to work around this?
Ideally, I’d like the measure to adapt based on the field currently visible in each row, regardless of how many fields are selected.
Firstly, there's no way to use anything about the field parameter to do this. When using a field parameter based on columns, as opposed to measures, on the rows of a matrix the field parameter itself is not passed to the query, only the underlying model columns are included in the query, so there is no way to detect anything about the field parameter.
If you know the order of the possible fields in the hierarchy then you could use ISINSCOPE, as techies suggested, with the lowest in the hierarchy as the first test case, and then increasing in order.
If you don't know the order then all I can think of is to have a series of IF ( ISINSCOPE( 'Table'[A] ) && NOT ISINSCOPE( 'Table'[B] ) ) etc, but that doesn't strike me as manageable for more than a couple of columns.
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
19 | |
7 | |
6 | |
5 | |
4 |
User | Count |
---|---|
26 | |
10 | |
10 | |
9 | |
6 |