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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
sat_tok52
Creator
Creator

If Condition

Hi Guru's,

I need a calculated dimension as per my requirement ,but I trying below expression it's not working . I wanted to see divided amount and minus amount under one column called AMT.

=If(Sum(AMT)/Sum(TOTAL AMT) or

Sum(AMT)-Sum(TOTAL AMT),'AMT'))

In any help.

-Sateesh

3 Replies
robert_mika
Master III
Master III

If takesn condition

so your first argument must have = or is (isnull,istext...)

At the moment the first argumet is not equal to anything

(Sum(AMT)/Sum(TOTAL AMT) or

Sum(AMT)-Sum(TOTAL AMT

must be like

if(Sum(AMT)/Sum(TOTAL AMT)=... or

Sum(AMT)-Sum(TOTAL AMT=.... ,'AMT....

swuehl
MVP
MVP

Could you elaborate a bit more what you are trying to achieve?

Above won't work for multiple reasons, but maybe there is a totally different approach possible?

For example, why not just use two expressions to show the divided amount and the difference of amounts?

mithilesh17
Partner - Creator II
Partner - Creator II

Hi,

Requirement unclear. Is AMT and TOTAL AMT are two different fields?

Provide sample app.

Regards,