• liver.larson (7/31/2015)


    When I do dynamic grouping, I use a calculated field with a simple switch( Parameters!Parameter1.Value="Text1", Fields.Field1Value ... ) It's easy to read, I can add as many switches as I want to a single field/parameter combo, not restrained by naming convention of fields in dataset, so the switch can easily use fields that are named wildly differently, logic is stored in exactly one place, so the one field can be referenced by sorting, grouping, labeling, whatever. If I need to make a change or addition, I don't need to remember all the places the expression was duplicated. It's also then easy to pair up multiple functionality with more than one parameter/calc.field combo. So for example, I might have a "color by" combo, a "sort by" combo, and a "group by" combo. User makes their selections, calc fields respond, and visualization/table is generated accordingly. If I need to remap, or add/remove selections available in parameter, it's just the one place to go editing, no matter how complex the table/viz gets.

    Nice!