This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. We're covering it all. You won't want to miss it.
Learn moreLevel up your Power BI skills this month - build one visual each week and tell better stories with data! Get started
Hi,
I have a parameter table that lets users dynamically choose a dimension (e.g., product category, product family, etc.), which changes how the data is sliced in a visual.
I’d like to calculate a total that always matches what’s currently visible in the table, regardless of the selected dimension.
Ideally something like:
SUMX(
SUMMARIZECOLUMNS(dynamic columns),
[Measure]
)
But since the columns would need to change dynamically, I’m not sure if this is achievable in DAX.
Is there a way to achive this or a better workaround? (Without manually listing all the possible combinations)
Thanks in advance!
Solved! Go to Solution.
Field parameters aren’t actual columns, so they can’t be used directly inside SUMMARIZE. They act more like a dynamic dimension selector. To work with the selected field, create a conditional measure that responds to the chosen parameter value.
Example:
VAR _order =
SELECTEDVALUE ( FieldParameter[Order] )
RETURN
SWITCH (
_order,
1,
SUMX (
SUMMARIZECOLUMNS (
'Table'[Column1],
"@value", [The Measure]
),
[@value]
),
2,
SUMX (
SUMMARIZECOLUMNS (
'Table'[Column2],
"@value", [The Measure]
),
[@value]
),
3,
SUMX (
SUMMARIZECOLUMNS (
'Table'[Column3],
"@value", [The Measure]
),
[@value]
)
)
Hi @asparagus1_
We have not received a response from you regarding the query and were following up to check if you had the opportunity to review the information provided. Please feel free to contact us if you have any further questions.
Thank You.
Hi @asparagus1_
Thank you for submitting your question to the Microsoft Fabric Community Forum. Also, thanks also to @Thomaslleblanc , @lbendlin , @danextian and @Kedar_Pande for providing helpful suggestions.
Could you let us know if the suggested solution resolved your issue? If not, please share any additional details so we can assist further.
Best regards,
Community Support Team.
Field Parameters + ALLSELECTED total:
Dynamic Total =
SUMX(
ALLSELECTED(ParameterTable),
CALCULATE([YourMeasure])
)
Matches visible table total exactly
If this answer helped, please click 👍 or Accept as Solution.
-Kedar
LinkedIn: https://www.linkedin.com/in/kedar-pande
Field parameters aren’t actual columns, so they can’t be used directly inside SUMMARIZE. They act more like a dynamic dimension selector. To work with the selected field, create a conditional measure that responds to the chosen parameter value.
Example:
VAR _order =
SELECTEDVALUE ( FieldParameter[Order] )
RETURN
SWITCH (
_order,
1,
SUMX (
SUMMARIZECOLUMNS (
'Table'[Column1],
"@value", [The Measure]
),
[@value]
),
2,
SUMX (
SUMMARIZECOLUMNS (
'Table'[Column2],
"@value", [The Measure]
),
[@value]
),
3,
SUMX (
SUMMARIZECOLUMNS (
'Table'[Column3],
"@value", [The Measure]
),
[@value]
)
)
I’d like to calculate a total that always matches what’s currently visible in the table
You seem to be looking for Visual Calculations.
You cannot have a dynamic column in a measure using SUMMARIZECOLUMNS
You could use a more complicated method like a mapping table and the TREATAS function, but that is more complicated than a simplae measure
Check out the April 2026 Power BI update to learn about new features.
Sign up to receive a private message when registration opens and key events begin.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
| User | Count |
|---|---|
| 35 | |
| 32 | |
| 26 | |
| 21 | |
| 18 |
| User | Count |
|---|---|
| 68 | |
| 37 | |
| 32 | |
| 25 | |
| 23 |