Forum Discussion
asparagus1_
4 months agoHelper 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...
- 4 months ago
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] ) )
v-karpurapud
4 months agoCommunity 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.