2 Replies Latest reply: Aug 19, 2015 1:38 PM by Massimo Grossi

# Exclude negative Values from expression

Hi,

I have the expression to calculate the Units. But i am having some negative Units (Value) which i dont want to include in the calculation.

=num((Sum({<Type = {'AB','CL'},

[Year] = {\$(=max([Year]))}, [Month] = {"<=\$(=max({<[Year]={\$(=max([Year]))}>} [Month]))"}>}[Units])),'##,##0')

How do i do this?

=num((Sum({<Type = {'AB','CL'}, Units -={},

[Year] = {\$(=max([Year]))}, [Month] = {"<=\$(=max({<[Year]={\$(=max([Year]))}>} [Month]))"}>}[Units])),'##,##0')

Thanks,

Ahmed

• ###### Re: Exclude negative Values from expression

Have you tried using it like the below:

=num((Sum({<Type = {'AB','CL'}, Units ={">0"},

[Year] = {\$(=max([Year]))}, [Month] = {"<=\$(=max({<[Year]={\$(=max([Year]))}>} [Month]))"}>}[Units])),'##,##0')

• ###### Re: Exclude negative Values from expression

=num((Sum({<Type = {'AB','CL'},

[Year] = {\$(=max([Year]))}, [Month] = {"<=\$(=max({<[Year]={\$(=max([Year]))}>} [Month]))"}>} rangemax(0,[Units]) )),'##,##0')