Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Level up your Power BI skills this month - build one visual each week and tell better stories with data! Get started

Reply
asparagus1_
Helper I
Helper I

Parameter table dimensions - summarize

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!

1 ACCEPTED SOLUTION
danextian
Super User
Super User

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]
        )
)




Dane Belarmino | Microsoft MVP | Proud to be a Super User!

Did I answer your question? Mark my post as a solution!


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.

View solution in original post

6 REPLIES 6
v-karpurapud
Community Support
Community Support

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.

v-karpurapud
Community Support
Community Support

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.

Kedar_Pande
Super User
Super User

@asparagus1_ 

 

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

danextian
Super User
Super User

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]
        )
)




Dane Belarmino | Microsoft MVP | Proud to be a Super User!

Did I answer your question? Mark my post as a solution!


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.
lbendlin
Super User
Super User

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.

Thomaslleblanc
Super User
Super User

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

 

Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

Check out the April 2026 Power BI update to learn about new features.

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.