Example, you have 3 values and you want them sorted as per below:
Low
MediumHigh
A to Z would give you
High
LowMedium
Z to A would be a reverse so neither of these would achieve the required sort order.
The answer is so add a IFF Statement to the Sort Expression and select A to Z as the Order, so for example
=iif(value=”Low”,”1”, iif(value=”Medium”,”2”, iif(value=”High”,”3”,””)))
The order is then sorted on the numeric value as opposed to the Alphabetical value, thus giving you your desired sort order J
Thank you.
ReplyDeleteNeed this.
Stewart Anderson
West Australian News
Instead of nesting IIF() functions, rather use the Switch() construct.
ReplyDelete=Switch(Fields!Field1.Value = "Low", 1,
Fields!Field1.Value = "Medium", 2,
Fields!Field1.Value = "High", 3)
Dave: very true, either way works.
ReplyDeleteGetting error The SortExpression.Value expression for the tablix ‘Tablix1’ contains an error: [BC30198] ')' expected.
ReplyDelete