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_
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.