Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
upaliwije
Creator II
Creator II

Expression

Hi,

sum(IF(DESCRIPTION='NET_PROFIT')<0,{<DESCRIPTION={'NET_PROFIT'}>}ACTUAL)

my above expression does work. Pls help me to correct it

Labels (1)
1 Solution

Accepted Solutions
sasiparupudi1
Master III
Master III

This May be

if (Sum({<DESCRIPTION={'NET_PROFIT'}>}ACTUAL)<0,Sum({<DESCRIPTION={'NET_PROFIT'}>}ACTUAL),0)

View solution in original post

9 Replies
sunny_talwar
MVP
MVP

May be this:

=Sum({<DESCRIPTION={'NET_PROFIT'}>}ACTUAL)

puttemans
Specialist
Specialist

What exactly do you want to realize? Seems like you're mixing up bracket types and syntax.

upaliwije
Creator II
Creator II
Author

Tks

What Exactly I want to get is If Description='NET_PROFIT'<0  then sum Actual where Description='NET_PROFIT'

sunny_talwar
MVP
MVP

Try this may be:

=Sum({<DESCRIPTION={"=NET_PROFIT<0"}>}ACTUAL)

puttemans
Specialist
Specialist

This is a bit strange. What is the name of you variable? Description or net_profit?

If net_profit and Actual are variables, then the formula should look like :

sum( If( NET_PROFIT < 0, Actual, 0))

If your variable is Description, then how can NET_PROFIT be a variable together with '0'?

upaliwije
Creator II
Creator II
Author

It also does not work

sasiparupudi1
Master III
Master III

This May be

if (Sum({<DESCRIPTION={'NET_PROFIT'}>}ACTUAL)<0,Sum({<DESCRIPTION={'NET_PROFIT'}>}ACTUAL),0)

krishna20
Specialist II
Specialist II

Hi,

This may be

If(DESCRIPTION='NET_PROFIT'<0,SUM({<DESCRIPTION={'NET_PROFIT'}>}ACTUAL))

NavinReddy
Creator II
Creator II

try like this

If(DESCRIPTION='NET_PROFIT'<0,SUM({<DESCRIPTION={'NET_PROFIT'}>}ACTUAL),0)