0
我有一個很大的SSRS報告,我試圖從多個字段中獲取最大值。現在我有IIF抓取兩個日期之間的MAX值,但是我希望所有報告中的字段。這裏是我必須抓住兩個值從SSRS中的多個字段中挑選最大值
=IIF(((IIF(Fields!OnOrder1Day.Value<Fields!Sold1Day.Value,
Fields!Sold1Day.Value, Fields!OnOrder1Day.Value) +
IIF(Fields!OnOrder2Day.Value<Fields!Sold2Day.Value, Fields!Sold2Day.Value,
Fields!OnOrder2Day.Value) +
IIF(Fields!OnOrder3Day.Value<Fields!Sold3Day.Value, Fields!Sold3Day.Value,
Fields!OnOrder3Day.Value)) - (Fields!lonhand.Value -
Fields!OnOrderToday.Value)-Fields!onpo.Value)<0, 0,
((IIF(Fields!OnOrder1Day.Value<Fields!Sold1Day.Value, Fields!Sold1Day.Value,
Fields!OnOrder1Day.Value) +
IIF(Fields!OnOrder2Day.Value<Fields!Sold2Day.Value, Fields!Sold2Day.Value,
Fields!OnOrder2Day.Value) +
IIF(Fields!OnOrder3Day.Value<Fields!Sold3Day.Value, Fields!Sold3Day.Value,
Fields!OnOrder3Day.Value)) - (Fields!lonhand.Value -
Fields!OnOrderToday.Value)-Fields!onpo.Value))
之間的MAX我想要做的是從以下所有領域找到MAX:
Fields!OnOrder1Day.Value
Fields!Sold1Day.Value
Fields!OnOrder2Day.Value
Fields!Sold2Day.Value
Fields!OnOrder3Day.Value
Fields!Sold3Day.Value
Fields!OnOrder4Day.Value
Fields!Sold4Day.Value
Fields!OnOrder5Day.Value
Fields!Sold5Day.Value
Fields!OnOrder6Day.Value
Fields!Sold6Day.Value
是否有可能像做
MAX(Fields!OnOrder1Day.Value,Fields!Sold1Day.Value,Fields!OnOrder2Day.Value,Fields!Sold2Day.Value,Fields!OnOrder3Day.Value,Fields!Sold3Day.Value,Fields!OnOrder4Day.Value,Fields!Sold4Day.Value,Fields!OnOrder5Day.Value,Fields!Sold5Day.Value,Fields!OnOrder6Day.Value,Fields!Sold6Day.Value)