reporting services - SSRS SWITCH Syntax not working -


i have columns in dataset returning several different values. in attempt use grouping in report trying clean data. after reading several posts found this post seemed close needed.

i set expressions this

=switch( left(fields!t6_tow_by.value,3)="ace","ace wrecker", left(fields!t6_tow_by.value,3)="car","car store", left(fields!t6_tow_by.value,7)="the car","car store", fields!t6_tow_by.value 

)

the expression not throw error when preview it, columns show "error" can please show me going wrong here?

thanks

the switch statement requires pairs of arguments. can't have last value else condition. try this:

=switch( left(fields!t6_tow_by.value,3)="ace","ace wrecker", left(fields!t6_tow_by.value,3)="car","car store", left(fields!t6_tow_by.value,7)="the car","car store", true, fields!t6_tow_by.value ) 

Comments