Skip to main content
Announcements
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
AH
Creator III
Creator III

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?

Any help please?


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

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


Thanks,

Ahmed


1 Solution

Accepted Solutions
sinanozdemir
Specialist III
Specialist III

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')

View solution in original post

2 Replies
sinanozdemir
Specialist III
Specialist III

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')

maxgro
MVP
MVP

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

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