Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
srini
Creator
Creator

Subtract not working in expression...

I have expression, as follows

 

=if([Cycle Name]='FORECAST',[Total Charge (000s USD)])-[Direct Cost]

 

but it is not giving me result it is only showing blank.

anything I missed?

2 Replies
dplr-rn
Partner - Master III
Partner - Master III

why is [Direct Cost] outside the if statement?

try changing to
=if([Cycle Name]='FORECAST',[Total Charge (000s USD)]-[Direct Cost] )

m_woolf
Master II
Master II

In addition to dilipranjith's reply, if either field is null the subtract will be null.

You can replace the subtract with: rangesum([Total Charge (000s USD)]),-[Direct Cost])