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

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
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])